From e72d48eadcded309a3622493eb496fca18be326c Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 13 Feb 2015 17:44:15 +0530 Subject: [PATCH] Fixed local variable cur referenced before assignment --- ee/core/mysql.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ee/core/mysql.py b/ee/core/mysql.py index c40b2bfd..cc245ede 100644 --- a/ee/core/mysql.py +++ b/ee/core/mysql.py @@ -48,6 +48,9 @@ class EEMysql(): .format(statement)) cur.execute(statement) + cur.close() + conn.close() + except Exception as e: cur.close() conn.close() @@ -57,8 +60,6 @@ class EEMysql(): else: Log.error(self, '{0}'.format(errormsg)) - cur.close() - conn.close() # def __del__(self): # self.cur.close()