mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-27 14:29:21 -05:00
pep8
This commit is contained in:
parent
7bcee4733a
commit
9a3c80a348
@ -268,9 +268,11 @@ class CaptchaServerHttpClient(SimpleHttpClient):
|
|||||||
# twisted dislikes google's response, no content length.
|
# twisted dislikes google's response, no content length.
|
||||||
defer.returnValue(e.response)
|
defer.returnValue(e.response)
|
||||||
|
|
||||||
|
|
||||||
def encode_urlencode_args(args):
|
def encode_urlencode_args(args):
|
||||||
return {k: encode_urlencode_arg(v) for k, v in args.items()}
|
return {k: encode_urlencode_arg(v) for k, v in args.items()}
|
||||||
|
|
||||||
|
|
||||||
def encode_urlencode_arg(arg):
|
def encode_urlencode_arg(arg):
|
||||||
if isinstance(arg, unicode):
|
if isinstance(arg, unicode):
|
||||||
return arg.encode('utf-8')
|
return arg.encode('utf-8')
|
||||||
@ -279,6 +281,7 @@ def encode_urlencode_arg(arg):
|
|||||||
else:
|
else:
|
||||||
return arg
|
return arg
|
||||||
|
|
||||||
|
|
||||||
def _print_ex(e):
|
def _print_ex(e):
|
||||||
if hasattr(e, "reasons") and e.reasons:
|
if hasattr(e, "reasons") and e.reasons:
|
||||||
for ex in e.reasons:
|
for ex in e.reasons:
|
||||||
|
Loading…
Reference in New Issue
Block a user