summaryrefslogtreecommitdiff
path: root/src/leap/keymanager/openpgp.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-08-02 10:34:46 -0300
committerTomás Touceda <chiiph@leap.se>2013-08-02 10:34:46 -0300
commit8c1200d745185cdee1d17b127797f8da2da29c80 (patch)
treed404b984a13fd2956256a641750eaefe505a166c /src/leap/keymanager/openpgp.py
parent898092e3a754dd19239c3eea314d58d8ff420149 (diff)
parent295fc59c347b06038330f9d6d5d74047e8f4a8a3 (diff)
Merge remote-tracking branch 'kali/feature/more_debug_info' into develop
Diffstat (limited to 'src/leap/keymanager/openpgp.py')
-rw-r--r--src/leap/keymanager/openpgp.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/leap/keymanager/openpgp.py b/src/leap/keymanager/openpgp.py
index d19bb2b5..9d404cb9 100644
--- a/src/leap/keymanager/openpgp.py
+++ b/src/leap/keymanager/openpgp.py
@@ -473,7 +473,7 @@ class OpenPGPScheme(EncryptionScheme):
self.get_key(address)
raise errors.KeyAlreadyExists(address)
except errors.KeyNotFound:
- pass
+ logger.debug('Key for %s not found' % (address,))
def _gen_key(gpg):
params = gpg.gen_key_input(
@@ -482,9 +482,18 @@ class OpenPGPScheme(EncryptionScheme):
name_real=address,
name_email=address,
name_comment='Generated by LEAP Key Manager.')
+ logger.info("About to generate keys... This might take SOME time.")
gpg.gen_key(params)
+ logger.info("Keys for %s have been successfully "
+ "generated." % (address,))
pubkeys = gpg.list_keys()
+
# assert for new key characteristics
+
+ # XXX This exception is not properly catched by the soledad
+ # bootstrapping, so if we do not finish generating the keys
+ # we end with a blocked thread -- kali
+
leap_assert(
len(pubkeys) is 1, # a unitary keyring!
'Keyring has wrong number of keys: %d.' % len(pubkeys))