From 21efc5d63e8622617770973159fcbea81a1570d2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Nov 2016 17:19:12 +0100 Subject: [PATCH] +self --- python/lorautil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/lorautil.py b/python/lorautil.py index 118e835..479f6ba 100644 --- a/python/lorautil.py +++ b/python/lorautil.py @@ -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)