mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-23 18:59:26 -05:00
Fix to appease the PEP8 dragon
This commit is contained in:
parent
a53774721a
commit
87acd8fb07
@ -404,7 +404,9 @@ def _parse_json(request):
|
|||||||
try:
|
try:
|
||||||
content = json.loads(request.content.read())
|
content = json.loads(request.content.read())
|
||||||
if type(content) != dict:
|
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
|
return content
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise SynapseError(400, "Content not JSON.", errcode=Codes.NOT_JSON)
|
raise SynapseError(400, "Content not JSON.", errcode=Codes.NOT_JSON)
|
||||||
|
Loading…
Reference in New Issue
Block a user