From 1e2dda9e10a27220f988dc939e92dfe39b1e7201 Mon Sep 17 00:00:00 2001 From: drebs Date: Tue, 20 Sep 2016 20:47:15 -0300 Subject: [bug] only generate key if soledad has ever synced --- src/leap/bitmask/keymanager/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/leap/bitmask/keymanager') 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): """ -- cgit v1.2.3