summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorGergely Polonkai <gergely.polonkai@ericsson.com>2016-02-26 12:05:38 +0100
committerGergely Polonkai <gergely.polonkai@ericsson.com>2016-02-26 12:05:38 +0100
commit87acd8fb075114849ca06188ef333119ea73ad12 (patch)
tree564c053a80e6d2d3a22b78aa33a666ef98daaacb /synapse/rest
parentAdd error codes for malformed/bad JSON in /login (diff)
downloadsynapse-87acd8fb075114849ca06188ef333119ea73ad12.tar.xz
Fix to appease the PEP8 dragon
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/v1/login.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py
index a4f89aea7b..f13272da8e 100644
--- a/synapse/rest/client/v1/login.py
+++ b/synapse/rest/client/v1/login.py
@@ -404,7 +404,9 @@ def _parse_json(request):
     try:
         content = json.loads(request.content.read())
         if type(content) != dict:
-            raise SynapseError(400, "Content must be a JSON object.", errcode=Codes.BAD_JSON)
+            raise SynapseError(
+                400, "Content must be a JSON object.", errcode=Codes.BAD_JSON
+            )
         return content
     except ValueError:
         raise SynapseError(400, "Content not JSON.", errcode=Codes.NOT_JSON)