mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
ruff: Fix N818 exception name should be named with an Error suffix.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
eb2c822d3f
commit
73c4da7974
@@ -58,11 +58,11 @@ class StateHandler:
|
||||
return is_key_in_bot_storage(self.user_profile, key)
|
||||
|
||||
|
||||
class EmbeddedBotQuitException(Exception):
|
||||
class EmbeddedBotQuitError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class EmbeddedBotEmptyRecipientsList(Exception):
|
||||
class EmbeddedBotEmptyRecipientsListError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ class EmbeddedBotHandler:
|
||||
recipients = ",".join(message["to"]).split(",")
|
||||
|
||||
if len(message["to"]) == 0:
|
||||
raise EmbeddedBotEmptyRecipientsList(_("Message must have recipients!"))
|
||||
raise EmbeddedBotEmptyRecipientsListError(_("Message must have recipients!"))
|
||||
elif len(message["to"]) == 1:
|
||||
recipient_user = get_active_user(recipients[0], self.user_profile.realm)
|
||||
message_id = internal_send_private_message(
|
||||
@@ -151,4 +151,4 @@ class EmbeddedBotHandler:
|
||||
raise
|
||||
|
||||
def quit(self, message: str = "") -> None:
|
||||
raise EmbeddedBotQuitException(message)
|
||||
raise EmbeddedBotQuitError(message)
|
||||
|
||||
Reference in New Issue
Block a user