From 1d6d329a65ea7b5d68e22e26d645483ff1dc3ba3 Mon Sep 17 00:00:00 2001 From: Avasam Date: Tue, 23 Jun 2026 22:24:28 -0400 Subject: [PATCH] Avoid bare except --- CHANGES.txt | 1 + src/pywinbox/_pywinbox_win.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index b3b851b..0a0f790 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,4 @@ +0.8, 2026/XX/XX -- WIN32: Replaced bare `except:` clauses with `except Exception:`, preventing accidental suppression of system-exit signals (KeyboardInterrupt, SystemExit) during error handling. 0.7, 2024/03/22 -- LINUX: Added ewmhlib as separate module. (Really) Fixed position and size for GNOME (by using GTK_EXTENTS) 0.6, 2023/10/12 -- LINUX: Improved position and size for GNOME (by using GTK_EXTENTS) WIN32: Fixed GetAwarenessFromDpiAwarenessContext not supported on Windows Server diff --git a/src/pywinbox/_pywinbox_win.py b/src/pywinbox/_pywinbox_win.py index 6d6aebc..ce201c1 100644 --- a/src/pywinbox/_pywinbox_win.py +++ b/src/pywinbox/_pywinbox_win.py @@ -30,7 +30,7 @@ def _getHandle(handle: Union[int, str]) -> Optional[int]: if isinstance(handle, str): try: newHandle = int(handle, base=16) - except: + except Exception: pass elif isinstance(handle, int): newHandle = handle