summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/keymanager/nicknym.py
diff options
context:
space:
mode:
authorZara Gebru <zgebru@thoughtworks.com>2016-11-18 16:51:27 +0100
committerKali Kaneko (leap communications) <kali@leap.se>2016-11-22 15:57:05 +0100
commit1baa817b567cc234e76faafc5ec92cfa75222ba6 (patch)
tree156204c635077f27f6c0f124f731c6b2347f961a /src/leap/bitmask/keymanager/nicknym.py
parent0871c96aa71d9b9112a90ab7cc6d4adfc3cd7fa4 (diff)
[tests] fix keymanager tests after refactor and merge
- some pep8 problems - some confusion with old and new code after merging from old keymanager
Diffstat (limited to 'src/leap/bitmask/keymanager/nicknym.py')
-rw-r--r--src/leap/bitmask/keymanager/nicknym.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/leap/bitmask/keymanager/nicknym.py b/src/leap/bitmask/keymanager/nicknym.py
index 7af49d6d..5fe99925 100644
--- a/src/leap/bitmask/keymanager/nicknym.py
+++ b/src/leap/bitmask/keymanager/nicknym.py
@@ -139,12 +139,14 @@ class Nicknym(object):
def check_404(response):
if response.code == NOT_FOUND:
- message = ' %s: Key not found. Request: %s' % (response.code, uri)
+ message = ' %s: Key not found. Request: %s' \
+ % (response.code, uri)
logger.warning(message)
raise KeyNotFound(message), None, sys.exc_info()[2]
return response
- d = self._async_client_pinned.request(str(uri), 'GET', callback=check_404)
+ d = self._async_client_pinned.request(str(uri), 'GET',
+ callback=check_404)
d.addCallback(client.readBody)
return d
@@ -162,7 +164,8 @@ class Nicknym(object):
:rtype: Deferred
"""
- return self._get_key_from_nicknym(self._nickserver_uri + '?address=' + address)
+ return self._get_key_from_nicknym(self._nickserver_uri +
+ '?address=' + address)
@memoized_method(invalidation=300)
def fetch_key_with_fingerprint(self, fingerprint):
@@ -178,4 +181,5 @@ class Nicknym(object):
:rtype: Deferred
"""
- return self._get_key_from_nicknym(self._nickserver_uri + '?fingerprint=' + fingerprint)
+ return self._get_key_from_nicknym(self._nickserver_uri +
+ '?fingerprint=' + fingerprint)