summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-10-01 13:56:55 -0300
committerTomás Touceda <chiiph@leap.se>2013-10-01 13:56:55 -0300
commit10c1eadc76b5c903feac32a6e2d113034d05cee0 (patch)
tree428855aa1d807832fc57ac3e62fcd1bd82b68ac0
parent53cf9157dce23881f81f3f20cfbd54cdb26a56c6 (diff)
parent009fcbf7870b95910f50fe9e618fcaed51930ada (diff)
Merge remote-tracking branch 'kali/bug/soledad-boostrap-problem' into develop
-rw-r--r--changes/bug_3985-soledad-boostrap-problem2
-rw-r--r--src/leap/bitmask/services/soledad/soledadbootstrapper.py18
2 files changed, 19 insertions, 1 deletions
diff --git a/changes/bug_3985-soledad-boostrap-problem b/changes/bug_3985-soledad-boostrap-problem
new file mode 100644
index 00000000..629481de
--- /dev/null
+++ b/changes/bug_3985-soledad-boostrap-problem
@@ -0,0 +1,2 @@
+ o Add more verbose error handling during key generation and syncing.
+ Helps diagnose: #3985; Addresses in part: #3965
diff --git a/src/leap/bitmask/services/soledad/soledadbootstrapper.py b/src/leap/bitmask/services/soledad/soledadbootstrapper.py
index d348661d..6731cc84 100644
--- a/src/leap/bitmask/services/soledad/soledadbootstrapper.py
+++ b/src/leap/bitmask/services/soledad/soledadbootstrapper.py
@@ -362,11 +362,27 @@ class SoledadBootstrapper(AbstractBootstrapper):
try:
self._keymanager.get_key(
address, openpgp.OpenPGPKey, private=True, fetch_remote=False)
+ return
except KeyNotFound:
logger.debug("Key not found. Generating key for %s" % (address,))
+
+ # generate key
+ try:
self._keymanager.gen_key(openpgp.OpenPGPKey)
+ except Exception as exc:
+ logger.error("error while generating key!")
+ logger.exception(exc)
+ raise
+
+ # send key
+ try:
self._keymanager.send_key(openpgp.OpenPGPKey)
- logger.debug("Key generated successfully.")
+ except Exception as exc:
+ logger.error("error while sending key!")
+ logger.exception(exc)
+ raise
+
+ logger.debug("Key generated successfully.")
def run_soledad_setup_checks(self,
provider_config,