1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04:00

Memory cleanup in sql db routines for mass actions.

This commit is contained in:
echel0n 2014-06-30 04:55:49 -07:00
parent 5e507b3849
commit b19aafb807

View File

@ -143,7 +143,9 @@ class DBConnection(object):
sqlResult.append(self.execute(qu[0], qu[1]))
logger.log(u"Transaction with " + str(len(querylist)) + u" queries executed", logger.DEBUG)
return sqlResult
# finished
break
except sqlite3.OperationalError, e:
sqlResult = []
if self.connection:
@ -162,6 +164,9 @@ class DBConnection(object):
logger.log(u"Fatal error executing query: " + ex(e), logger.ERROR)
raise
# cleanup
del querylist
return sqlResult
def action(self, query, args=None, fetchall=False, fetchone=False):