Skip to content

fix: replace bare except with except Exception in win32.py#282

Open
KeloYuan wants to merge 1 commit into
dschep:masterfrom
KeloYuan:fix/bare-except-improvements
Open

fix: replace bare except with except Exception in win32.py#282
KeloYuan wants to merge 1 commit into
dschep:masterfrom
KeloYuan:fix/bare-except-improvements

Conversation

@KeloYuan

@KeloYuan KeloYuan commented May 8, 2026

Copy link
Copy Markdown

Summary

Replaces bare except: with except Exception: in ntfy/backends/win32.py (line 40).

Why

Bare except: catches SystemExit and KeyboardInterrupt, which can mask Ctrl+C handling.

Bare except: catches SystemExit and KeyboardInterrupt.
Copilot AI review requested due to automatic review settings May 8, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Windows notification backend to avoid using a bare except: when loading the tray icon, ensuring that control-flow exceptions like KeyboardInterrupt and SystemExit are not inadvertently swallowed.

Changes:

  • Replaced a bare except: with except Exception: around win32gui.LoadImage(...) in the Win32 backend.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants