Skip to content

fix: replace bare except with except Exception in crypto.py - #138

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

fix: replace bare except with except Exception in crypto.py#138
KeloYuan wants to merge 1 commit into
grantjenks:masterfrom
KeloYuan:fix/bare-except-improvements

Conversation

@KeloYuan

@KeloYuan KeloYuan commented May 8, 2026

Copy link
Copy Markdown

Replaces bare except: with except Exception: in src/freegames/crypto.py (line 69).

Copilot AI review requested due to automatic review settings May 8, 2026 13:14

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 improves exception handling in src/freegames/crypto.py by replacing a bare except: with except Exception: when parsing the user-provided crypto key, avoiding unintended interception of non-Exception signals (e.g., KeyboardInterrupt, SystemExit).

Changes:

  • Replace except: with except Exception: in get_key() to avoid catching BaseException subclasses.

💡 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