diff options
author | Kali Kaneko <kali@futeisha.org> | 2013-09-02 00:03:14 +0200 |
---|---|---|
committer | Kali Kaneko <kali@futeisha.org> | 2013-09-02 00:03:14 +0200 |
commit | cd5e297c2abdb082c10161f256c286b8216de883 (patch) | |
tree | d6001b34ad44ec5a365eb36525a89b769620ba7c /src/leap/keymanager/__init__.py | |
parent | 5ef6f1ae070ed7e5236aab119d7785f70e54b8e3 (diff) | |
parent | 97d72aeda6ea094590069ba0d671c00404409d83 (diff) |
Merge remote-tracking branch 'chiiph/bug/several_fixes' into develop
Diffstat (limited to 'src/leap/keymanager/__init__.py')
-rw-r--r-- | src/leap/keymanager/__init__.py | 15 |
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): |