From d1c39d389737ee844f42c5ed3dfc97c8ddf24250 Mon Sep 17 00:00:00 2001 From: drebs Date: Tue, 12 May 2015 18:07:27 -0300 Subject: [bug] remove unused pending documents exception When we started implementing the sync db, one of the ideas was to reuse the data in the database in the case of a sync interruption. We don't do that now and thus the pending documents exception is unneeded. This commit removes that exception from the code. --- client/src/leap/soledad/client/sqlcipher.py | 6 ------ client/src/leap/soledad/client/target.py | 4 ---- 2 files changed, 10 deletions(-) (limited to 'client/src/leap/soledad') diff --git a/client/src/leap/soledad/client/sqlcipher.py b/client/src/leap/soledad/client/sqlcipher.py index d3b3d01b..39d5dd0e 100644 --- a/client/src/leap/soledad/client/sqlcipher.py +++ b/client/src/leap/soledad/client/sqlcipher.py @@ -68,7 +68,6 @@ from twisted.enterprise import adbapi from leap.soledad.client import encdecpool from leap.soledad.client.target import SoledadSyncTarget -from leap.soledad.client.target import PendingReceivedDocsSyncError from leap.soledad.client.sync import SoledadSynchronizer from leap.soledad.client import pragmas @@ -636,17 +635,12 @@ class SQLCipherU1DBSync(SQLCipherDatabase): log.msg('syncer sync...') res = syncer.sync(autocreate=autocreate, defer_decryption=defer_decryption) - - except PendingReceivedDocsSyncError: - logger.warning("Local sync db is not clear, skipping sync...") - return except CannotSendRequest: logger.warning("Connection with sync target couldn't be " "established. Resetting connection...") # closing the connection it will be recreated in the next try syncer.sync_target.close() return - return res def stop_sync(self): diff --git a/client/src/leap/soledad/client/target.py b/client/src/leap/soledad/client/target.py index 17ce718f..f2415218 100644 --- a/client/src/leap/soledad/client/target.py +++ b/client/src/leap/soledad/client/target.py @@ -71,10 +71,6 @@ def _gunzip(data): return data -class PendingReceivedDocsSyncError(Exception): - pass - - class DocumentSyncerThread(threading.Thread): """ A thread that knowns how to either send or receive a document during the -- cgit v1.2.3