diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2016-09-17 04:22:37 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2016-12-12 09:11:58 -0200 |
commit | 01625647c291a90b72a5c5caa9793fbf0d98a8f7 (patch) | |
tree | 65a34c03894471c30d4af21687d6566d14462a5f /client/src/leap/soledad | |
parent | ea3eea052069d5cc933937fd077d94569e4336a4 (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/src/leap/soledad')
-rw-r--r-- | client/src/leap/soledad/client/sync.py | 3 |
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, |