--- a/pgconsole/database.py Thu Mar 07 18:26:52 2013 +0100
+++ b/pgconsole/database.py Sun Mar 10 16:14:53 2013 +0100
@@ -37,7 +37,7 @@
try:
conn = psycopg2.connect(conninfo, async=1)
psycopg2.extras.wait_select(conn)
- except psycopg2.DatabaseError, e:
+ except psycopg2.DatabaseError as e:
raise DatabaseError(str(e))
return conn
@@ -71,12 +71,12 @@
curs.execute(q, args)
psycopg2.extras.wait_select(curs.connection)
# conn.commit()
- except psycopg2.OperationalError, e:
+ except psycopg2.OperationalError as e:
# disconnected?
# conn.rollback()
conn.close()
raise BadConnectionError(str(e))
- except psycopg2.DatabaseError, e:
+ except psycopg2.DatabaseError as e:
# conn.rollback()
raise DatabaseError(str(e), curs.query)
return curs