Cleanup after database use

This commit is contained in:
Ruud
2012-05-07 21:55:18 +02:00
parent 7a6576e407
commit 7ca509cdbe
16 changed files with 78 additions and 28 deletions
+3 -1
View File
@@ -61,6 +61,7 @@ class Searcher(Plugin):
if self.shuttingDown():
break
db.close()
self.in_progress = False
def single(self, movie):
@@ -147,7 +148,7 @@ class Searcher(Plugin):
if self.shuttingDown():
break
db.remove()
db.close()
return False
def download(self, data, movie, manual = False):
@@ -190,6 +191,7 @@ class Searcher(Plugin):
except Exception, e:
log.error('Failed marking movie finished: %s %s' % (e, traceback.format_exc()))
db.close()
return True
log.info('Tried to download, but none of the downloaders are enabled')