Avoid else clause on exception for clarity
This commit is contained in:
parent
94c7fadc98
commit
0f8591a5a8
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue