From 01625647c291a90b72a5c5caa9793fbf0d98a8f7 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Sat, 17 Sep 2016 04:22:37 -0300 Subject: [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 --- client/src/leap/soledad/client/sync.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client/src/leap') 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, -- cgit v1.2.3