summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-06-25 11:05:52 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-06-25 11:05:52 +0100
commitaf21fbb33824977a392ffc4c7875b800901a3328 (patch)
tree22f5039752a9387b28bb3d85df5fc6ffdf34c897
parentExplain why we rate-limit using a threepid (diff)
downloadsynapse-af21fbb33824977a392ffc4c7875b800901a3328.tar.xz
Simplify medium and address assignment
-rw-r--r--synapse/rest/client/v1/login.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py
index 98a3365f05..b90ad6d79e 100644
--- a/synapse/rest/client/v1/login.py
+++ b/synapse/rest/client/v1/login.py
@@ -144,10 +144,8 @@ class LoginRestServlet(RestServlet):
 
         # Check whether this attempt uses a threepid, if so, check if our failed attempt
         # ratelimiter allows another attempt at this time
-        medium, address = (
-            login_submission.get("medium"),
-            login_submission.get("address"),
-        )
+        medium = login_submission.get("medium")
+        address = login_submission.get("address")
         if medium and address:
             self._failed_attempts_ratelimiter.ratelimit(
                 (medium, address.lower()), update=False