From 4eb9290f148884d8822c030a7414d11374b1151a Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 6 Oct 2025 21:35:08 +0200 Subject: [PATCH] Don't use overly-broad BaseException where inadequate. --- src/ircplom/client.py | 6 +++--- src/run.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ircplom/client.py b/src/ircplom/client.py index 141b59e..330022d 100644 --- a/src/ircplom/client.py +++ b/src/ircplom/client.py @@ -21,15 +21,15 @@ from ircplom.msg_parse_expectations import MSG_EXPECTATIONS _NAMES_DESIRED_SERVER_CAPS = ('sasl',) -class SendFail(BaseException): +class SendFail(Exception): 'When Client.send fails.' -class TargetUserOffline(BaseException): +class TargetUserOffline(Exception): 'When according to server our target user is not to be found.' -class ImplementationFail(BaseException): +class ImplementationFail(Exception): 'When no matching parser found for server message.' diff --git a/src/run.py b/src/run.py index 2b17f64..90c03cd 100755 --- a/src/run.py +++ b/src/run.py @@ -43,7 +43,7 @@ def main_loop(cls_term: type[TerminalInterface], cls_tui: type[BaseTui] if __name__ == '__main__': - class _HandledException(BaseException): + class _HandledException(Exception): 'To fail with only passed message rather than stack listing' try: -- 2.30.2