summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2018-05-10 12:23:53 +0100
committerDavid Baker <dave@matrix.org>2018-05-10 12:23:53 +0100
commit6b49628e3bf18f6cc1a1347fef8e4180e854d245 (patch)
tree88f53459ece59fd2d91578b5cc40a0a7e4e5aed9
parentMany docstrings (diff)
downloadsynapse-6b49628e3bf18f6cc1a1347fef8e4180e854d245.tar.xz
Catch failure to part user from room
Diffstat (limited to '')
-rw-r--r--synapse/handlers/deactivate_account.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/synapse/handlers/deactivate_account.py b/synapse/handlers/deactivate_account.py
index c00ec18627..4eb18775e8 100644
--- a/synapse/handlers/deactivate_account.py
+++ b/synapse/handlers/deactivate_account.py
@@ -114,10 +114,16 @@ class DeactivateAccountHandler(BaseHandler):
         rooms_for_user = yield self.store.get_rooms_for_user(user_id)
         for room_id in rooms_for_user:
             logger.info("User parter parting %r from %r", user_id, room_id)
-            yield self._room_member_handler.update_membership(
-                create_requester(user),
-                user,
-                room_id,
-                "leave",
-                ratelimit=False,
-            )
+            try:
+                yield self._room_member_handler.update_membership(
+                    create_requester(user),
+                    user,
+                    room_id,
+                    "leave",
+                    ratelimit=False,
+                )
+            except Exception:
+                logger.exception(
+                    "Failed to part user %r from room %r: ignoring and continuing",
+                    user_id, room_id,
+                )