diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2019-09-04 11:52:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-04 11:52:39 +0100 |
commit | 29c34891d66d80190006e830d355c9b82a5b17f0 (patch) | |
tree | af7923c4adbc5486a9267aef22ffa85a0a4cb7d3 /synapse | |
parent | id_access_token support (diff) | |
download | synapse-29c34891d66d80190006e830d355c9b82a5b17f0.tar.xz |
Apply suggestions from code review
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/identity.py | 6 |
1 files 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: |