summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2018-05-24 11:23:15 +0100
committerDavid Baker <dave@matrix.org>2018-05-24 11:23:15 +0100
commit9700d15611ec93d1177d29181362fbd02df92629 (patch)
tree901ec633f69674f3b516935df5b03909a24c81d1 /synapse/handlers
parentcomment (diff)
downloadsynapse-9700d15611ec93d1177d29181362fbd02df92629.tar.xz
pep8
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/auth.py3
-rw-r--r--synapse/handlers/deactivate_account.py9
-rw-r--r--synapse/handlers/identity.py7
3 files changed, 12 insertions, 7 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index c3f20417c7..512c31185d 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -826,7 +826,8 @@ class AuthHandler(BaseHandler):
             address = address.lower()
 
         identity_handler = self.hs.get_handlers().identity_handler
-        identity_handler.unbind_threepid(user_id,
+        identity_handler.unbind_threepid(
+            user_id,
             {
                 'medium': medium,
                 'address': address,
diff --git a/synapse/handlers/deactivate_account.py b/synapse/handlers/deactivate_account.py
index 0277f80b75..f92f953a79 100644
--- a/synapse/handlers/deactivate_account.py
+++ b/synapse/handlers/deactivate_account.py
@@ -60,17 +60,20 @@ class DeactivateAccountHandler(BaseHandler):
         threepids = yield self.store.user_get_threepids(user_id)
         for threepid in threepids:
             try:
-                yield self._identity_handler.unbind_threepid(user_id,
+                yield self._identity_handler.unbind_threepid(
+                    user_id,
                     {
                         'medium': threepid['medium'],
                         'address': threepid['address'],
                     },
                 )
-            except:
+            except Exception:
                 # Do we want this to be a fatal error or should we carry on?
                 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'])
+            yield self.store.user_delete_threepid(
+                user_id, threepid['medium'], threepid['address'],
+            )
 
         # first delete any devices belonging to the user, which will also
         # delete corresponding access tokens.
diff --git a/synapse/handlers/identity.py b/synapse/handlers/identity.py
index 6bc3479755..92cd4019d8 100644
--- a/synapse/handlers/identity.py
+++ b/synapse/handlers/identity.py
@@ -148,9 +148,10 @@ class IdentityHandler(BaseHandler):
             logger.warn("Can't unbind threepid: no trusted ID servers set in config")
             defer.returnValue(False)
 
-        # We don't track what ID server we added 3pids on (perhaps we ought to) but we assume
-        # that any of the servers in the trusted list are in the same ID server federation,
-        # so we can pick any one of them to send the deletion request to.
+        # We don't track what ID server we added 3pids on (perhaps we ought to)
+        # but we assume that any of the servers in the trusted list are in the
+        # same ID server federation, so we can pick any one of them to send the
+        # deletion request to.
         id_server = next(iter(self.trusted_id_servers))
 
         url = "https://%s/_matrix/identity/api/v1/3pid/unbind" % (id_server,)