Skip to content
Snippets Groups Projects
Commit d614b8f9 authored by Felix Schäfer's avatar Felix Schäfer :construction_worker:
Browse files

Remove intermediary variables

parent a6baa4de
No related branches found
No related tags found
No related merge requests found
Pipeline #64492 passed
......@@ -51,22 +51,20 @@ def matrix_inviter_invite(
r.raise_for_status()
except (requests.ConnectionError, requests.HTTPError) as e:
if r.status_code in (400, 403):
response_dump = r.json()
order.log_action(
"pretix_matrix_inviter.error",
data={
"matrix_id": user_matrix_id,
"matrix_room": room_matrix_id,
"error": "HTTP Code {} ({})".format(
r.status_code, response_dump["error"]
r.status_code, r.json()["error"]
),
},
)
else:
try:
if r.status_code == 429:
response_dump = r.json()
backoff = response_dump["retry_after_ms"] / 1000
backoff = r.json()["retry_after_ms"] / 1000
self.retry(countdown=backoff)
else:
self.retry()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment