Introducing lib/utils/sqlalchemy.py (Issue #361)

This commit is contained in:
stamparm
2013-04-15 10:33:25 +02:00
parent b6fee638ef
commit 3e65037a05
5 changed files with 74 additions and 13 deletions

View File

@@ -46,8 +46,10 @@ class Connector:
def close(self):
try:
self.cursor.close()
self.connector.close()
if self.cursor:
self.cursor.close()
if self.connector:
self.connector.close()
except Exception, msg:
logger.debug(msg)
finally: