Skip to content

Commit 06cf620

Browse files
committed
Do not try to access non-existant .errorno on IOError.
1 parent f40117a commit 06cf620

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

load_into_pg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def handleTable(table, keys, dbname, mbDbFile, mbHost, mbPort, mbUsername, mbPas
103103

104104
except IOError as e:
105105
print >> sys.stderr, "Could not read from file {}.".format(dbFile)
106-
print >> sys.stderr, "IOError ({0}): {1}".format(e.errorno, e.strerror)
106+
print >> sys.stderr, "IOError: {0}".format(e.strerror)
107107
except pg.Error as e:
108108
print >> sys.stderr, "Error in dealing with the database."
109109
print >> sys.stderr, "pg.Error ({0}): {1}".format(e.pgcode, e.pgerror)

0 commit comments

Comments
 (0)