summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2017-03-12 19:31:49 +0100
committerdrebs <drebs@leap.se>2017-03-13 16:47:54 +0100
commitbc76f3740a8f0d797cf32c31c2bb4cae3fe22216 (patch)
tree93634c965fe0fc99331087a31df55867976ba824 /client/src/leap/soledad
parent739fa78ad984836ed2d16e16850cc46b4c40748d (diff)
[bug] remove offline flag
The offline flag is not needed and rendered the soledad client prone to bugs because it would need to be toggled and that is succeptible to timing problems.
Diffstat (limited to 'client/src/leap/soledad')
-rw-r--r--client/src/leap/soledad/client/api.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/client/src/leap/soledad/client/api.py b/client/src/leap/soledad/client/api.py
index 4be38cf1..cff797bf 100644
--- a/client/src/leap/soledad/client/api.py
+++ b/client/src/leap/soledad/client/api.py
@@ -128,7 +128,7 @@ class Soledad(object):
def __init__(self, uuid, passphrase, secrets_path, local_db_path,
server_url, cert_file, shared_db=None,
- auth_token=None, offline=False):
+ auth_token=None):
"""
Initialize configuration, cryptographic keys and dbs.
@@ -165,12 +165,6 @@ class Soledad(object):
Authorization token for accessing remote databases.
:type auth_token: str
- :param offline:
- If set to ``True``, this database will not attempt to save/load
- secrets to/from server or synchronize with remote replicas (default
- is ``False``)
- :type offline: bool
-
:raise BootstrapSequenceError:
Raised when the secret initialization sequence (i.e. retrieval
from server or generation and storage on server) has failed for
@@ -184,7 +178,6 @@ class Soledad(object):
self.server_url = server_url
self.shared_db = shared_db
self.token = auth_token
- self.offline = offline
self._dbsyncer = None
@@ -649,7 +642,7 @@ class Soledad(object):
:rtype: twisted.internet.defer.Deferred
"""
# maybe bypass sync
- if self.offline or not self.token:
+ if not self.token:
generation = self._dbsyncer.get_generation()
return defer.succeed(generation)