summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2016-09-17 04:22:37 -0300
committerdrebs <drebs@leap.se>2016-12-12 09:11:58 -0200
commit01625647c291a90b72a5c5caa9793fbf0d98a8f7 (patch)
tree65a34c03894471c30d4af21687d6566d14462a5f /client
parentea3eea052069d5cc933937fd077d94569e4336a4 (diff)
[test] commit isnt part of the backend api
Check if the backend provides a commit method before calling or we will break the tests with InMemoryDatabase
Diffstat (limited to 'client')
-rw-r--r--client/src/leap/soledad/client/sync.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/leap/soledad/client/sync.py b/client/src/leap/soledad/client/sync.py
index 8303f65d..4cbd9f2a 100644
--- a/client/src/leap/soledad/client/sync.py
+++ b/client/src/leap/soledad/client/sync.py
@@ -176,7 +176,8 @@ class SoledadSynchronizer(Synchronizer):
defer_decryption=defer_decryption)
logger.debug("target gen after sync: %d" % new_gen)
logger.debug("target trans_id after sync: %s" % new_trans_id)
- self.source.commit() # sync worked, commit
+ if hasattr(self.source, 'commit'):
+ self.source.commit() # sync worked, commit
info = {
"target_replica_uid": self.target_replica_uid,
"new_gen": new_gen,