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

Commit

Permalink
Move comment out of try block
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 committed Sep 17, 2019
1 parent 2331d9d commit 49b23c0
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions synapse/handlers/room_member.py
Expand Up @@ -1068,20 +1068,29 @@ def _ask_id_server_for_third_party_invite(
url, invite_config
)
except HttpResponseException as e:
logger.warning("Error trying to call /store-invite on %s%s: %s",
id_server_scheme, id_server, e)
logger.warning(
"Error trying to call /store-invite on %s%s: %s",
id_server_scheme,
id_server,
e,
)

if data is None:
# Some identity servers may only support application/x-www-form-urlencoded
# types. This is especially true with old instances of Sydent, see
# https://github.com/matrix-org/sydent/pull/170
try:
# Some identity servers may only support application/x-www-form-urlencoded
# types. This is especially true with old instances of Sydent, see
# https://github.com/matrix-org/sydent/pull/170
data = yield self.simple_http_client.post_urlencoded_get_json(
url, invite_config
)
except HttpResponseException as e:
logger.warning("Error calling /store-invite on %s%s with fallback "
"encoding: %s", id_server_scheme, id_server, e)
logger.warning(
"Error calling /store-invite on %s%s with fallback "
"encoding: %s",
id_server_scheme,
id_server,
e,
)
raise e

# TODO: Check for success
Expand Down

0 comments on commit 49b23c0

Please sign in to comment.