summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2014-07-08 10:44:38 -0300
committerdrebs <drebs@leap.se>2014-07-08 11:53:20 -0300
commit139528ec20cd5fa840e98ec19a03b5c642ce995d (patch)
tree8d3fac172b4833ef88f871964e4eb3f189e983cf /client/src/leap/soledad
parent1e69bf4aceb2502a17dff98581acc7abcf41e168 (diff)
Fix sqlcipher db syncing property.
Diffstat (limited to 'client/src/leap/soledad')
-rw-r--r--client/src/leap/soledad/client/sqlcipher.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/client/src/leap/soledad/client/sqlcipher.py b/client/src/leap/soledad/client/sqlcipher.py
index 46ceca42..38d5e7ec 100644
--- a/client/src/leap/soledad/client/sqlcipher.py
+++ b/client/src/leap/soledad/client/sqlcipher.py
@@ -480,13 +480,11 @@ class SQLCipherDatabase(sqlite_backend.SQLitePartialExpandDatabase):
@property
def syncing(self):
- syncing = False
- for url in self._syncers:
- _, _, lock = self._syncers[url]
- is_not_locked = lock.acquire(blocking=False)
- if is_not_locked is False:
- return True
- lock.release()
+ lock = SQLCipherDatabase.syncing_lock[self._get_replica_uid()]
+ acquired_lock = lock.acquire(False)
+ if acquired_lock is False:
+ return True
+ lock.release()
return False
def _get_syncer(self, url, creds=None):