This commit is contained in:
Nico Schottelius 2016-11-15 17:19:12 +01:00
parent fe4ecafe59
commit 21efc5d63e
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ class DB(object):
def __iter__(self):
try:
self.conn = psycopg2.connect("dbname={}".format(dbname))
self.cursor = conn.cursor()
self.cursor = self.conn.cursor()
self.cursor.execute(self.query)
except Exception as e:
log.error("DB query failed: %s" % e)