summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-10-29 15:20:19 +0000
committerRichard van der Hoff <richard@matrix.org>2018-10-31 15:43:57 +0000
commit0f8591a5a8695aa176736c651a361c40cf228b6d (patch)
tree5457b7337fe0b531c06900b8c22d83470868e5e1
parentAttempt to move room aliases on room upgrades (diff)
downloadsynapse-0f8591a5a8695aa176736c651a361c40cf228b6d.tar.xz
Avoid else clause on exception for clarity
-rw-r--r--synapse/handlers/room.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 76811050a6..9ff4656717 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -331,13 +331,12 @@ class RoomCreationHandler(BaseHandler):
                 yield directory_handler.delete_association(
                     requester, alias, send_event=False,
                 )
+                removed_aliases.append(alias_str)
             except SynapseError as e:
                 logger.warning(
                     "Unable to remove alias %s from old room: %s",
                     alias, e,
                 )
-            else:
-                removed_aliases.append(alias_str)
 
         # if we didn't find any aliases, or couldn't remove anyway, we can skip the rest
         # of this.