X-Git-Url: http://git.datanom.net/securemail.git/blobdiff_plain/6004ded914957910ab4bc8173db811098a9987a7..83a29369f877307549a84dd2a60bc242eca4be7e:/db.py diff --git a/db.py b/db.py index cabd8bf..93eea09 100644 --- a/db.py +++ b/db.py @@ -79,7 +79,7 @@ class DB: if self.conn is None: if DBTYPE == 'mysql': import MySQLdb - self.conn = MySQLdb.connect(host=DBHOST, port=DBPORT, user=DBUID, password=DBPWD, database=DBNAME) + self.conn = MySQLdb.connect(host=DBHOST, port=DBPORT, user=DBUID, passwd=DBPWD, db=DBNAME) elif DBTYPE == 'postgresql': import psycopg2 self.conn = psycopg2.connect(host=DBHOST, port=DBPORT, user=DBUID, password=DBPWD, dbname=DBNAME) @@ -163,7 +163,6 @@ class DBInterface: cursor.execute(sqlite_sql) cursor.execute('commit') except DBError as e: - print (e) if DBTYPE != 'sqlite': conn.rollback() else: