Commit e0ad2e52 authored by Kostas Vogias's avatar Kostas Vogias Committed by Stavros Sachtouris
Browse files

Handle synnefo non-json responses

parent 8d4f9def
......@@ -102,8 +102,12 @@ def call_kamaki(environ, start_response, *args, **kwargs):
r = method(*args, **kwargs)
code, status, headers = r.status_code, r.status, r.headers
body = _stringify_json_values(r.json)
except ClientError:
body = None
bodystr = ''
if body is not None:
bodystr = json.dumps(body)
headers['content-length'] = '{0}'.format(len(bodystr))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment