summaryrefslogtreecommitdiff
path: root/keymanager/src/leap
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2015-02-19 10:21:56 -0600
committerRuben Pollan <meskio@sindominio.net>2015-02-19 10:40:47 -0600
commit74a2c68557fd86752bc52e1bda9f38e0460f0349 (patch)
tree217e404ebd091cd8255053dd6d1ae0d03082e19a /keymanager/src/leap
parent961861044fd2bb50e6e445b05291c03133389d3d (diff)
Fetch keys should return KeyNotFound for unknown errors
Diffstat (limited to 'keymanager/src/leap')
-rw-r--r--keymanager/src/leap/keymanager/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/keymanager/src/leap/keymanager/__init__.py b/keymanager/src/leap/keymanager/__init__.py
index a1a59f54..3ef63505 100644
--- a/keymanager/src/leap/keymanager/__init__.py
+++ b/keymanager/src/leap/keymanager/__init__.py
@@ -230,11 +230,11 @@ class KeyManager(object):
if e.response.status_code == 404:
d = defer.fail(KeyNotFound(address))
else:
- d = defer.fail(e)
+ d = defer.fail(KeyNotFound(e.message))
logger.warning("HTTP error retrieving key: %r" % (e,))
logger.warning("%s" % (res.content,))
except Exception as e:
- d = defer.fail(e)
+ d = defer.fail(KeyNotFound(e.message))
logger.warning("Error retrieving key: %r" % (e,))
return d