From 22d3a8d4c6a1e652109378245989f4f6a71d1f42 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 16 Sep 2014 11:41:31 -0500 Subject: comments + pep8 --- client/src/leap/soledad/client/crypto.py | 3 +++ client/src/leap/soledad/client/sync.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'client/src/leap') diff --git a/client/src/leap/soledad/client/crypto.py b/client/src/leap/soledad/client/crypto.py index 5e3760b3..d68f3089 100644 --- a/client/src/leap/soledad/client/crypto.py +++ b/client/src/leap/soledad/client/crypto.py @@ -616,6 +616,9 @@ class SyncEncrypterPool(SyncEncryptDecryptPool): :param content: The encrypted document. :type content: str """ + # FIXME --- callback should complete immediately since otherwise the + # thread which handles the results will get blocked + # Right now we're blocking the dispatcher with the writes to sqlite. sql_del = "DELETE FROM '%s' WHERE doc_id=?" % (self.TABLE_NAME,) sql_ins = "INSERT INTO '%s' VALUES (?, ?, ?)" % (self.TABLE_NAME,) diff --git a/client/src/leap/soledad/client/sync.py b/client/src/leap/soledad/client/sync.py index c158f2a7..0297c75c 100644 --- a/client/src/leap/soledad/client/sync.py +++ b/client/src/leap/soledad/client/sync.py @@ -120,7 +120,7 @@ class SoledadSynchronizer(Synchronizer): " target my gen: %d\n" " target my trans_id: %s" % (self.target_replica_uid, target_gen, target_trans_id, - target_my_gen, target_my_trans_id)) + target_my_gen, target_my_trans_id)) # make sure we'll have access to target replica uid once it exists if self.target_replica_uid is None: @@ -138,7 +138,7 @@ class SoledadSynchronizer(Synchronizer): # what's changed since that generation and this current gen my_gen, _, changes = self.source.whats_changed(target_my_gen) - logger.debug("Soledad sync: there are %d documents to send." \ + logger.debug("Soledad sync: there are %d documents to send." % len(changes)) # get source last-seen database generation for the target -- cgit v1.2.3