From 68f89f1dc3de213783b32dbfa3ff6d1e294c51a8 Mon Sep 17 00:00:00 2001 From: drebs Date: Mon, 27 Apr 2015 15:31:36 -0300 Subject: [doc] fix doc on why to re-raise sync exceptions --- client/src/leap/soledad/client/sync.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/src/leap/soledad/client/sync.py b/client/src/leap/soledad/client/sync.py index 1a5e2989..d3f106da 100644 --- a/client/src/leap/soledad/client/sync.py +++ b/client/src/leap/soledad/client/sync.py @@ -81,10 +81,13 @@ class SoledadSynchronizer(Synchronizer): return self._sync(autocreate=autocreate, defer_decryption=defer_decryption) except Exception: - # re-raising the exceptions to let syqlcipher.sync catch them - # (and re-create the syncer instance if needed) + # we want this exception to reach either SQLCipherU1DBSync.sync or + # the Solead api object itself, so it is poperly handled and/or + # logged... raise finally: + # ... but we also want to release the syncing lock so this + # Synchronizer may be reused later. self.release_syncing_lock() def _sync(self, autocreate=False, defer_decryption=True): -- cgit v1.2.3