summary refs log tree commit diff
path: root/synapse/handlers/deactivate_account.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2019-06-20 19:32:02 +1000
committerGitHub <noreply@github.com>2019-06-20 19:32:02 +1000
commit32e7c9e7f20b57dd081023ac42d6931a8da9b3a3 (patch)
tree139ef30c957535699d1ae0474e8b5ba2517196b2 /synapse/handlers/deactivate_account.py
parentMerge pull request #5042 from matrix-org/erikj/fix_get_missing_events_error (diff)
downloadsynapse-32e7c9e7f20b57dd081023ac42d6931a8da9b3a3.tar.xz
Run Black. (#5482)
Diffstat (limited to 'synapse/handlers/deactivate_account.py')
-rw-r--r--synapse/handlers/deactivate_account.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/synapse/handlers/deactivate_account.py b/synapse/handlers/deactivate_account.py
index 7378b56c1d..e8f9da6098 100644
--- a/synapse/handlers/deactivate_account.py
+++ b/synapse/handlers/deactivate_account.py
@@ -28,6 +28,7 @@ logger = logging.getLogger(__name__)
 
 class DeactivateAccountHandler(BaseHandler):
     """Handler which deals with deactivating user accounts."""
+
     def __init__(self, hs):
         super(DeactivateAccountHandler, self).__init__(hs)
         self._auth_handler = hs.get_auth_handler()
@@ -78,9 +79,9 @@ class DeactivateAccountHandler(BaseHandler):
                 result = yield self._identity_handler.try_unbind_threepid(
                     user_id,
                     {
-                        'medium': threepid['medium'],
-                        'address': threepid['address'],
-                        'id_server': id_server,
+                        "medium": threepid["medium"],
+                        "address": threepid["address"],
+                        "id_server": id_server,
                     },
                 )
                 identity_server_supports_unbinding &= result
@@ -89,7 +90,7 @@ class DeactivateAccountHandler(BaseHandler):
                 logger.exception("Failed to remove threepid from ID server")
                 raise SynapseError(400, "Failed to remove threepid from ID server")
             yield self.store.user_delete_threepid(
-                user_id, threepid['medium'], threepid['address'],
+                user_id, threepid["medium"], threepid["address"]
             )
 
         # delete any devices belonging to the user, which will also
@@ -183,5 +184,6 @@ class DeactivateAccountHandler(BaseHandler):
             except Exception:
                 logger.exception(
                     "Failed to part user %r from room %r: ignoring and continuing",
-                    user_id, room_id,
+                    user_id,
+                    room_id,
                 )