+self
This commit is contained in:
parent
fe4ecafe59
commit
21efc5d63e
|
@ -99,7 +99,7 @@ class DB(object):
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
try:
|
try:
|
||||||
self.conn = psycopg2.connect("dbname={}".format(dbname))
|
self.conn = psycopg2.connect("dbname={}".format(dbname))
|
||||||
self.cursor = conn.cursor()
|
self.cursor = self.conn.cursor()
|
||||||
self.cursor.execute(self.query)
|
self.cursor.execute(self.query)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.error("DB query failed: %s" % e)
|
log.error("DB query failed: %s" % e)
|
||||||
|
|
Loading…
Reference in New Issue