summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/keymanager/__init__.py
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2016-09-20 20:47:15 -0300
committerdrebs <drebs@riseup.net>2016-09-22 15:34:15 -0300
commit1e2dda9e10a27220f988dc939e92dfe39b1e7201 (patch)
treedd385371187b532159204b8a124aef6bb680518f /src/leap/bitmask/keymanager/__init__.py
parente638e112a9f168a596753718e9f2ad55c5a53798 (diff)
[bug] only generate key if soledad has ever synced
Diffstat (limited to 'src/leap/bitmask/keymanager/__init__.py')
-rw-r--r--src/leap/bitmask/keymanager/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/leap/bitmask/keymanager/__init__.py b/src/leap/bitmask/keymanager/__init__.py
index b603fc5..c3ece05 100644
--- a/src/leap/bitmask/keymanager/__init__.py
+++ b/src/leap/bitmask/keymanager/__init__.py
@@ -783,6 +783,13 @@ class KeyManager(object):
pubkey.validation = validation
yield self.put_key(pubkey)
+ def ever_synced(self):
+ # TODO: provide this method in soledad api, avoid using a private
+ # attribute here
+ d = self._soledad._dbpool.runQuery('SELECT * FROM sync_log')
+ d.addCallback(lambda result: bool(result))
+ return d
+
def _split_email(address):
"""