From c4bcdea3621ad52400047170e3b7c8049755f629 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Thu, 19 Feb 2015 10:21:56 -0600 Subject: Fetch keys should return KeyNotFound for unknown errors --- src/leap/keymanager/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/leap') diff --git a/src/leap/keymanager/__init__.py b/src/leap/keymanager/__init__.py index a1a59f54..3ef63505 100644 --- a/src/leap/keymanager/__init__.py +++ b/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 -- cgit v1.2.3