From fd4412806c8afefc101cc8300d777c8f7e4b2858 Mon Sep 17 00:00:00 2001 From: drebs Date: Tue, 18 Aug 2015 12:03:16 -0300 Subject: [refactor] clarify sync target closing --- client/src/leap/soledad/client/sqlcipher.py | 3 ++- client/src/leap/soledad/client/sync.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/leap/soledad/client/sqlcipher.py b/client/src/leap/soledad/client/sqlcipher.py index 6a4fa01a..18a9c5de 100644 --- a/client/src/leap/soledad/client/sqlcipher.py +++ b/client/src/leap/soledad/client/sqlcipher.py @@ -598,7 +598,8 @@ class SQLCipherU1DBSync(SQLCipherDatabase): """ # close all open syncers for url in self._syncers.keys(): - self._syncers[url][1].close() + _, syncer = self._syncers[url] + syncer.close() del self._syncers[url] diff --git a/client/src/leap/soledad/client/sync.py b/client/src/leap/soledad/client/sync.py index 1a881555..deb183ca 100644 --- a/client/src/leap/soledad/client/sync.py +++ b/client/src/leap/soledad/client/sync.py @@ -185,6 +185,9 @@ class SoledadSynchronizer(Synchronizer): return self._record_sync_info_with_the_target(info["my_gen"]) def close(self): + """ + Close the synchronizer. + """ self.sync_target.close() def _record_sync_info_with_the_target(self, start_generation): -- cgit v1.2.3