This commit is contained in:
Paulus Schoutsen committed 2019-07-31 12:25:30 -07:00
1 parent da05dfe708
commit 4de97abc3a
2676 files changed
+163166 -140084

No files matched your search

+2 -6
View File
@@ -14,12 +14,8 @@ def aiohttp_serialize_response(response: web.Response) -> Dict[str, Any]:
# pylint: disable=protected-access
body = body._value.decode(body.encoding)
elif isinstance(body, bytes):
body = body.decode(response.charset or 'utf-8')
body = body.decode(response.charset or "utf-8")
else:
raise ValueError("Unknown payload encoding")
return {
'status': response.status,
'body': body,
'headers': dict(response.headers),
}
return {"status": response.status, "body": body, "headers": dict(response.headers)}