From f68f5f56696d2b82ee27894b994d85efc7994000 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 12 Feb 2016 19:04:13 +0530 Subject: [PATCH] try not to close sqlitedict more than once --- oml/downloads.py | 2 +- oml/library.py | 2 +- oml/update.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/oml/downloads.py b/oml/downloads.py index 8e62375..39f1645 100644 --- a/oml/downloads.py +++ b/oml/downloads.py @@ -59,7 +59,7 @@ class Downloads(Thread): def join(self): self.transfers.commit() - self.transfers.close() + self.transfers.close(do_log=False) return Thread.join(self) def wait_online(self): diff --git a/oml/library.py b/oml/library.py index cc67150..d70df0c 100644 --- a/oml/library.py +++ b/oml/library.py @@ -174,7 +174,7 @@ class Peer(object): def join(self): #self.library.join() self.library.commit() - self.library.close() + self.library.close(do_log=False) self.sync_info() def remove(self): diff --git a/oml/update.py b/oml/update.py index 74adcf2..0af6fb7 100644 --- a/oml/update.py +++ b/oml/update.py @@ -555,4 +555,5 @@ def migrate_11(): state.db.session.add(t) state.db.session.commit() state.downloads.transfers.commit() + state.downloads = None return 11