hobo: fix exception catching when configuring SQL

This commit is contained in:
Frédéric Péters 2015-09-14 12:30:27 +02:00
parent e894d0ce2e
commit ebe74cf537
1 changed files with 1 additions and 1 deletions

View File

@ -328,7 +328,7 @@ class CmdCheckHobos(Command):
postgresql_cfg[k] = v
try:
pgconn = psycopg2.connect(**postgresql_cfg)
except psycopg2.Error:
except psycopg2.Error as e:
print >> sys.stderr, 'failed to connect to postgresql (%s)' % \
psycopg2.errorcodes.lookup(e.pgcode)
return