mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-17 07:21:37 +01:00
Destructure again
This commit is contained in:
parent
ee8ba397e8
commit
c2d848b80d
1 changed files with 8 additions and 7 deletions
|
@ -190,11 +190,12 @@ class MatrixFederationHttpClient(object):
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _send_request_with_optional_trailing_slash(
|
def _send_request_with_optional_trailing_slash(
|
||||||
self,
|
self,
|
||||||
request,
|
request,
|
||||||
try_trailing_slash_on_400=False,
|
try_trailing_slash_on_400=False,
|
||||||
backoff_on_404=False,
|
backoff_on_404=False,
|
||||||
**kwargs):
|
**kwargs,
|
||||||
|
):
|
||||||
"""Wrapper for _send_request which can optionally retry the request
|
"""Wrapper for _send_request which can optionally retry the request
|
||||||
upon receiving a combination of a 400 HTTP response code and a
|
upon receiving a combination of a 400 HTTP response code and a
|
||||||
'M_UNRECOGNIZED' errcode. This is a workaround for Synapse <=v0.99.2
|
'M_UNRECOGNIZED' errcode. This is a workaround for Synapse <=v0.99.2
|
||||||
|
@ -585,7 +586,7 @@ class MatrixFederationHttpClient(object):
|
||||||
}
|
}
|
||||||
|
|
||||||
response = yield self._send_request_with_optional_trailing_slash(
|
response = yield self._send_request_with_optional_trailing_slash(
|
||||||
request, try_trailing_slash_on_400, backoff_on_404, send_request_args,
|
request, try_trailing_slash_on_400, backoff_on_404, **send_request_args,
|
||||||
)
|
)
|
||||||
|
|
||||||
body = yield _handle_json_response(
|
body = yield _handle_json_response(
|
||||||
|
@ -705,7 +706,7 @@ class MatrixFederationHttpClient(object):
|
||||||
}
|
}
|
||||||
|
|
||||||
response = yield self._send_request_with_optional_trailing_slash(
|
response = yield self._send_request_with_optional_trailing_slash(
|
||||||
request, try_trailing_slash_on_400, False, send_request_args,
|
request, try_trailing_slash_on_400, False, **send_request_args,
|
||||||
)
|
)
|
||||||
|
|
||||||
body = yield _handle_json_response(
|
body = yield _handle_json_response(
|
||||||
|
|
Loading…
Reference in a new issue