Avoid else clause on exception for clarity

This commit is contained in:
Richard van der Hoff 2018-10-29 15:20:19 +00:00
parent 94c7fadc98
commit 0f8591a5a8
1 changed files with 1 additions and 2 deletions

View File

@ -331,13 +331,12 @@ class RoomCreationHandler(BaseHandler):
yield directory_handler.delete_association( yield directory_handler.delete_association(
requester, alias, send_event=False, requester, alias, send_event=False,
) )
removed_aliases.append(alias_str)
except SynapseError as e: except SynapseError as e:
logger.warning( logger.warning(
"Unable to remove alias %s from old room: %s", "Unable to remove alias %s from old room: %s",
alias, e, 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 # if we didn't find any aliases, or couldn't remove anyway, we can skip the rest
# of this. # of this.