From 29c34891d66d80190006e830d355c9b82a5b17f0 Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Wed, 4 Sep 2019 11:52:39 +0100 Subject: Apply suggestions from code review Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --- synapse/handlers/identity.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/handlers/identity.py b/synapse/handlers/identity.py index d081f88fc5..89ba838f92 100644 --- a/synapse/handlers/identity.py +++ b/synapse/handlers/identity.py @@ -301,7 +301,7 @@ class IdentityHandler(BaseHandler): server with Returns: - str: the matrix ID of the 3pid, or None if it is not recognized. + str|None: the matrix ID of the 3pid, or None if it is not recognized. """ # If an access token is present, add it to the query params of the hash_details request query_params = {} @@ -313,7 +313,7 @@ class IdentityHandler(BaseHandler): hash_details = None try: hash_details = yield self.http_client.get_json( - "%s/_matrix/identity/v2/hash_details" % id_server, query_params + "%s/_matrix/identity/v2/hash_details" % (id_server, ), query_params ) except (HttpResponseException, ValueError) as e: # Catch HttpResponseExcept for a non-200 response code @@ -324,7 +324,7 @@ class IdentityHandler(BaseHandler): # This is an old identity server that does not yet support v2 lookups use_v1 = True else: - logger.warn("Error when looking up hashing details: %s" % (e,)) + logger.warning("Error when looking up hashing details: %s", e) return None if use_v1: -- cgit 1.4.1