summaryrefslogtreecommitdiff
path: root/src/leap/keymanager/__init__.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-09-06 15:32:48 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-09-06 15:32:48 -0300
commit54a105c53333a96c2649185823a8473a51f93479 (patch)
tree3bc7e855b886d8b0b44bcde4039497bc62ecd018 /src/leap/keymanager/__init__.py
parente1f1f502c724e6229eb81962c15a6b8cb826a2fa (diff)
parent53bdad6a6bb43113754f2cdf137abeea27bf8507 (diff)
Merge branch 'release-0.3.2'
Diffstat (limited to 'src/leap/keymanager/__init__.py')
-rw-r--r--src/leap/keymanager/__init__.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/leap/keymanager/__init__.py b/src/leap/keymanager/__init__.py
index 05cbcca..2f39ad9 100644
--- a/src/leap/keymanager/__init__.py
+++ b/src/leap/keymanager/__init__.py
@@ -127,11 +127,16 @@ class KeyManager(object):
self._ca_cert_path is not None,
'We need the CA certificate path!')
res = self._fetcher.get(uri, data=data, verify=self._ca_cert_path)
- # assert that the response is valid
- res.raise_for_status()
- leap_assert(
- res.headers['content-type'].startswith('application/json'),
- 'Content-type is not JSON.')
+ # Nickserver now returns 404 for key not found and 500 for
+ # other cases (like key too small), so we are skipping this
+ # check for the time being
+ # res.raise_for_status()
+
+ # Responses are now text/plain, although it's json anyway, but
+ # this will fail when it shouldn't
+ # leap_assert(
+ # res.headers['content-type'].startswith('application/json'),
+ # 'Content-type is not JSON.')
return res
def _put(self, uri, data=None):