summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug-improvie-error-handling1
-rw-r--r--src/leap/bitmask/services/mail/imap.py7
-rw-r--r--src/leap/bitmask/services/soledad/soledadbootstrapper.py7
3 files changed, 10 insertions, 5 deletions
diff --git a/changes/bug-improvie-error-handling b/changes/bug-improvie-error-handling
new file mode 100644
index 00000000..405dd771
--- /dev/null
+++ b/changes/bug-improvie-error-handling
@@ -0,0 +1 @@
+- Capture soledad boostrap errors after latest soledad changes.
diff --git a/src/leap/bitmask/services/mail/imap.py b/src/leap/bitmask/services/mail/imap.py
index 4828180e..2667f156 100644
--- a/src/leap/bitmask/services/mail/imap.py
+++ b/src/leap/bitmask/services/mail/imap.py
@@ -41,9 +41,10 @@ def get_mail_check_period():
try:
period = int(period_str)
except (ValueError, TypeError):
- logger.warning("BAD value found for %s: %s" % (
- INCOMING_CHECK_PERIOD_ENV,
- period_str))
+ if period is not None:
+ logger.warning("BAD value found for %s: %s" % (
+ INCOMING_CHECK_PERIOD_ENV,
+ period_str))
except Exception as exc:
logger.warning("Unhandled error while getting %s: %r" % (
INCOMING_CHECK_PERIOD_ENV,
diff --git a/src/leap/bitmask/services/soledad/soledadbootstrapper.py b/src/leap/bitmask/services/soledad/soledadbootstrapper.py
index 63596398..54ef67eb 100644
--- a/src/leap/bitmask/services/soledad/soledadbootstrapper.py
+++ b/src/leap/bitmask/services/soledad/soledadbootstrapper.py
@@ -41,7 +41,7 @@ from leap.common.check import leap_assert, leap_assert_type, leap_check
from leap.common.files import which
from leap.keymanager import KeyManager, openpgp
from leap.keymanager.errors import KeyNotFound
-from leap.soledad.client import Soledad
+from leap.soledad.client import Soledad, BootstrapSequenceError
logger = logging.getLogger(__name__)
@@ -260,7 +260,10 @@ class SoledadBootstrapper(AbstractBootstrapper):
logger.debug("SOLEDAD initialization TIMED OUT...")
self.soledad_timeout.emit()
except socket.error as exc:
- logger.error("Socket error while initializing soledad")
+ logger.warning("Socket error while initializing soledad")
+ self.soledad_timeout.emit()
+ except BootstrapSequenceError as exc:
+ logger.warning("Error while initializing soledad")
self.soledad_timeout.emit()
# unrecoverable