summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-04-17 11:39:30 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-04-17 11:39:30 +0100
commit40042dec0d4bab92ea82122a738c8c495a3adcdd (patch)
treea6d2ed3b0ec0acf654a5d09ac803f8e3776a7d55
parentRemove extraneous items from remote query try/except (diff)
downloadsynapse-40042dec0d4bab92ea82122a738c8c495a3adcdd.tar.xz
lint
-rw-r--r--synapse/handlers/e2e_keys.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py
index 863898cdf4..f80f0188c7 100644
--- a/synapse/handlers/e2e_keys.py
+++ b/synapse/handlers/e2e_keys.py
@@ -962,7 +962,7 @@ class E2eKeysHandler(object):
 
     @defer.inlineCallbacks
     def _get_e2e_cross_signing_verify_key(
-        self, user_id: str, desired_key_type: str, from_user_id:str = None
+        self, user_id: str, desired_key_type: str, from_user_id: str = None
     ):
         """Fetch or request the given cross-signing public key.
 
@@ -989,8 +989,7 @@ class E2eKeysHandler(object):
             user_id, desired_key_type, from_user_id
         )
 
-
-        # If we still can't find the key, and we're looking for keys of another user,
+        # If we still can't find the key, and we're looking for keys of another user
         # then attempt to fetch the missing key from the remote user's server.
         #
         # We may run into this in possible edge cases where a user tries to
@@ -1043,7 +1042,11 @@ class E2eKeysHandler(object):
             key_id, verify_key = get_verify_key_from_cross_signing_key(key)
         except ValueError as e:
             logger.debug(
-                "Invalid %s key retrieved: %s - %s %s", desired_key_type, key, type(e), e
+                "Invalid %s key retrieved: %s - %s %s",
+                desired_key_type,
+                key,
+                type(e),
+                e,
             )
             raise SynapseError(
                 502, "Invalid %s key retrieved from remote server", desired_key_type