summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2019-09-09 17:11:46 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2019-09-09 17:11:46 +0100
commit18671b01cc58d0f903fc9cac265839bc78b636d9 (patch)
treea5a28c9aeb16b23f625252ecec3948093a4684f8
parentaddress review comments (diff)
downloadsynapse-18671b01cc58d0f903fc9cac265839bc78b636d9.tar.xz
lint
-rw-r--r--synapse/handlers/room_member.py25
1 files changed, 10 insertions, 15 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index 7efd4d9db9..90ea674e49 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -710,7 +710,6 @@ class RoomMemberHandler(object):
         Returns:
             str|None: the matrix ID of the 3pid, or None if it is not recognized.
         """
-        query_params = {}
         if id_access_token is not None:
             try:
                 results = yield self._lookup_3pid_v2(
@@ -765,9 +764,7 @@ class RoomMemberHandler(object):
         return None
 
     @defer.inlineCallbacks
-    def _lookup_3pid_v2(
-        self, id_server, id_access_token, medium, address
-    ):
+    def _lookup_3pid_v2(self, id_server, id_access_token, medium, address):
         """Looks up a 3pid in the passed identity server using v2 lookup.
 
         Args:
@@ -783,8 +780,7 @@ class RoomMemberHandler(object):
         try:
             # Check what hashing details are supported by this identity server
             hash_details = yield self.simple_http_client.get_json(
-                "%s%s/_matrix/identity/v2/hash_details"
-                % (id_server_scheme, id_server),
+                "%s%s/_matrix/identity/v2/hash_details" % (id_server_scheme, id_server),
                 {"id_access_token": id_access_token},
             )
         except HttpResponseException as e:
@@ -799,14 +795,14 @@ class RoomMemberHandler(object):
         if not isinstance(hash_details, dict):
             logger.warning(
                 "Got non-dict object when checking hash details of %s%s: %s",
-                id_server_scheme, id_server,
+                id_server_scheme,
+                id_server,
                 hash_details,
             )
             raise SynapseError(
-                400, "Non-dict object from %s%s during v2 hash_details request: %s" % (
-                    id_server_scheme, id_server,
-                    hash_details,
-                )
+                400,
+                "Non-dict object from %s%s during v2 hash_details request: %s"
+                % (id_server_scheme, id_server, hash_details),
             )
 
         # Extract information from hash_details
@@ -819,10 +815,9 @@ class RoomMemberHandler(object):
             or not isinstance(lookup_pepper, str)
         ):
             raise SynapseError(
-                400, "Invalid hash details received from identity server: %s%s, %s" % (
-                    id_server_scheme, id_server,
-                    hash_details
-                )
+                400,
+                "Invalid hash details received from identity server: %s%s, %s"
+                % (id_server_scheme, id_server, hash_details),
             )
 
         # Check if any of the supported lookup algorithms are present