mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Memory cleanup in sql db routines for mass actions.
This commit is contained in:
parent
5e507b3849
commit
b19aafb807
1 changed files with 6 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue