pep8
This commit is contained in:
parent
4891c4ff72
commit
9f642a93ec
|
@ -42,10 +42,11 @@ def client_v2_pattern(path_regex):
|
||||||
|
|
||||||
def parse_request_allow_empty(request):
|
def parse_request_allow_empty(request):
|
||||||
content = request.content.read()
|
content = request.content.read()
|
||||||
if content == None or content == '':
|
if content is None or content == '':
|
||||||
return None
|
return None
|
||||||
return simplejson.loads(content)
|
return simplejson.loads(content)
|
||||||
|
|
||||||
|
|
||||||
def parse_json_dict_from_request(request):
|
def parse_json_dict_from_request(request):
|
||||||
try:
|
try:
|
||||||
content = simplejson.loads(request.content.read())
|
content = simplejson.loads(request.content.read())
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from synapse.api.constants import LoginType
|
from synapse.api.constants import LoginType
|
||||||
from synapse.api.errors import LoginError, SynapseError, Codes
|
from synapse.api.errors import SynapseError, Codes
|
||||||
from synapse.http.servlet import RestServlet
|
from synapse.http.servlet import RestServlet
|
||||||
|
|
||||||
from ._base import client_v2_pattern, parse_request_allow_empty
|
from ._base import client_v2_pattern, parse_request_allow_empty
|
||||||
|
|
Loading…
Reference in New Issue