summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/services/soledad/soledadbootstrapper.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-11-12 23:28:17 -0200
committerKali Kaneko <kali@leap.se>2013-11-12 23:28:17 -0200
commit19df4a679664e76874e970813599c13c94dfd745 (patch)
tree1759d80f209b80349612bec741659034267c6c10 /src/leap/bitmask/services/soledad/soledadbootstrapper.py
parent1fb82f0ad4a2a397e4b938748e58a64d057599e4 (diff)
re-raise the exceptions on init as expected
Diffstat (limited to 'src/leap/bitmask/services/soledad/soledadbootstrapper.py')
-rw-r--r--src/leap/bitmask/services/soledad/soledadbootstrapper.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/leap/bitmask/services/soledad/soledadbootstrapper.py b/src/leap/bitmask/services/soledad/soledadbootstrapper.py
index c672c893..b046d279 100644
--- a/src/leap/bitmask/services/soledad/soledadbootstrapper.py
+++ b/src/leap/bitmask/services/soledad/soledadbootstrapper.py
@@ -207,10 +207,6 @@ class SoledadBootstrapper(AbstractBootstrapper):
while sync_tries > 0:
try:
self._try_soledad_sync()
-
- # at this point, sometimes the client
- # gets stuck and does not progress to
- # the _gen_key step. XXX investigate.
logger.debug("Soledad has been synced.")
# so long, and thanks for all the fish
return
@@ -266,26 +262,32 @@ class SoledadBootstrapper(AbstractBootstrapper):
except socket.timeout:
logger.debug("SOLEDAD initialization TIMED OUT...")
self.soledad_timeout.emit()
+ raise
except socket.error as exc:
logger.warning("Socket error while initializing soledad")
self.soledad_timeout.emit()
+ raise
except BootstrapSequenceError as exc:
logger.warning("Error while initializing soledad")
self.soledad_timeout.emit()
+ raise
# unrecoverable
except u1db_errors.Unauthorized:
logger.error("Error while initializing soledad "
"(unauthorized).")
self.soledad_failed.emit()
+ raise
except u1db_errors.HTTPError as exc:
logger.exception("Error whie initializing soledad "
"(HTTPError)")
self.soledad_failed.emit()
+ raise
except Exception as exc:
logger.exception("Unhandled error while initializating "
"soledad: %r" % (exc,))
self.soledad_failed.emit()
+ raise
def _try_soledad_sync(self):
"""
@@ -299,9 +301,8 @@ class SoledadBootstrapper(AbstractBootstrapper):
logger.error("%r" % (exc,))
raise SoledadSyncError("Failed to sync soledad")
except Exception as exc:
- logger.exception("Unhandled error while syncing"
+ logger.exception("Unhandled error while syncing "
"soledad: %r" % (exc,))
- self.soledad_failed.emit()
raise SoledadSyncError("Failed to sync soledad")
def _download_config(self):