Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 committed Apr 17, 2020
1 parent 2c881bf commit 40042de
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions synapse/handlers/e2e_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ def _process_other_signatures(self, user_id, signatures):

@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.
Expand All @@ -989,8 +989,7 @@ def _get_e2e_cross_signing_verify_key(
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
Expand Down Expand Up @@ -1043,7 +1042,11 @@ def _get_e2e_cross_signing_verify_key(
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
Expand Down

0 comments on commit 40042de

Please sign in to comment.