commit | 538d3b903970306a416f8a2bda1fbdf31283c63d | [log] [tgz] |
---|---|---|
author | Daniel Veillard <veillard@src.gnome.org> | Tue Oct 01 14:04:56 2002 +0000 |
committer | Daniel Veillard <veillard@src.gnome.org> | Tue Oct 01 14:04:56 2002 +0000 |
tree | b11e0ff72f3861655f8314fc08cd6ca0ef9f7663 | |
parent | 2c77cd7ff8731457f74ed054f0e1a815ddaf3f4d [diff] |
Grab the passwd from an envidonment variable, Daniel
diff --git a/doc/index.py b/doc/index.py index f42e7b2..1747978 100755 --- a/doc/index.py +++ b/doc/index.py
@@ -126,7 +126,12 @@ global DB if passwd == None: - passwd = "ducon" + try: + passwd = os.environ["MySQL_PASS"] + except: + print "No password available, set environment MySQL_PASS" + sys.exit(1) + DB = MySQLdb.connect(passwd=passwd, db=db) if DB == None: return -1