diff options
author | Kali Kaneko <kali@leap.se> | 2013-11-13 16:42:15 -0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2013-11-13 16:42:15 -0200 |
commit | 223d17f74f59121875d2eb42c3a4e4d638ae2f08 (patch) | |
tree | 904404e37b5e5e188d8ec97f45568d1858c5e42c /src | |
parent | ff31617ff26293ed7ffcfa5b72d803bc3c766cc7 (diff) |
do not raise if error while syncing
Diffstat (limited to 'src')
-rw-r--r-- | src/leap/bitmask/services/soledad/soledadbootstrapper.py | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/src/leap/bitmask/services/soledad/soledadbootstrapper.py b/src/leap/bitmask/services/soledad/soledadbootstrapper.py index 70318ab8..e8c7e9ce 100644 --- a/src/leap/bitmask/services/soledad/soledadbootstrapper.py +++ b/src/leap/bitmask/services/soledad/soledadbootstrapper.py @@ -364,19 +364,32 @@ class SoledadBootstrapper(AbstractBootstrapper): """ srp_auth = self.srpauth logger.debug('initializing keymanager...') - self._keymanager = KeyManager( - address, - "https://nicknym.%s:6425" % (self._provider_config.get_domain(),), - self._soledad, - #token=srp_auth.get_token(), # TODO: enable token usage - session_id=srp_auth.get_session_id(), - ca_cert_path=self._provider_config.get_ca_cert_path(), - api_uri=self._provider_config.get_api_uri(), - api_version=self._provider_config.get_api_version(), - uid=srp_auth.get_uid(), - gpgbinary=self._get_gpg_bin_path()) + try: + self._keymanager = KeyManager( + address, + "https://nicknym.%s:6425" % ( + self._provider_config.get_domain(),), + self._soledad, + #token=srp_auth.get_token(), # TODO: enable token usage + session_id=srp_auth.get_session_id(), + ca_cert_path=self._provider_config.get_ca_cert_path(), + api_uri=self._provider_config.get_api_uri(), + api_version=self._provider_config.get_api_version(), + uid=srp_auth.get_uid(), + gpgbinary=self._get_gpg_bin_path()) + except Exception as exc: + logger.exception(exc) + raise + + logger.debug('sending key to server...') + # make sure key is in server - self._keymanager.send_key(openpgp.OpenPGPKey) + try: + self._keymanager.send_key(openpgp.OpenPGPKey) + except Exception as exc: + logger.error("Error sending key to server.") + logger.exception(exc) + # but we do not raise def _gen_key(self, _): """ |