summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/services/soledad
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/services/soledad')
-rw-r--r--src/leap/bitmask/services/soledad/soledadbootstrapper.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/leap/bitmask/services/soledad/soledadbootstrapper.py b/src/leap/bitmask/services/soledad/soledadbootstrapper.py
index f7217af6..b61d0d43 100644
--- a/src/leap/bitmask/services/soledad/soledadbootstrapper.py
+++ b/src/leap/bitmask/services/soledad/soledadbootstrapper.py
@@ -20,6 +20,7 @@ Soledad bootstrapping
import logging
import os
import socket
+import sqlite3
import sys
from ssl import SSLError
@@ -348,6 +349,10 @@ class SoledadBootstrapper(AbstractBootstrapper):
# ubuntu folks.
sync_tries -= 1
continue
+ except Exception as e:
+ logger.exception("Unhandled error while syncing "
+ "soledad: %r" % (e,))
+ break
# reached bottom, failed to sync
# and there's nothing we can do...
@@ -435,7 +440,9 @@ class SoledadBootstrapper(AbstractBootstrapper):
except u1db_errors.InvalidGeneration as exc:
logger.error("%r" % (exc,))
raise SoledadSyncError("u1db: InvalidGeneration")
-
+ except sqlite3.ProgrammingError as e:
+ logger.exception("%r" % (e,))
+ raise
except Exception as exc:
logger.exception("Unhandled error while syncing "
"soledad: %r" % (exc,))
@@ -508,10 +515,10 @@ class SoledadBootstrapper(AbstractBootstrapper):
if flags.OFFLINE is True:
args = (address, "https://localhost", self._soledad)
kwargs = {
- "session_id": "",
- "ca_cert_path": "",
- "api_uri": "",
- "api_version": "",
+ "session_id": "",
+ "ca_cert_path": "",
+ "api_uri": "",
+ "api_version": "",
"uid": self._uuid,
"gpgbinary": self._get_gpg_bin_path()
}
@@ -617,4 +624,4 @@ class SoledadBootstrapper(AbstractBootstrapper):
(self._gen_key, self.gen_key)
]
- self.addCallbackChain(cb_chain)
+ return self.addCallbackChain(cb_chain)