Skip to content

fix: replace 3 bare except clauses with except Exception#3980

Merged
petyaslavova merged 3 commits intoredis:masterfrom
haosenwang1018:fix/bare-excepts
Mar 4, 2026
Merged

fix: replace 3 bare except clauses with except Exception#3980
petyaslavova merged 3 commits intoredis:masterfrom
haosenwang1018:fix/bare-excepts

Conversation

@haosenwang1018
Copy link
Copy Markdown
Contributor

@haosenwang1018 haosenwang1018 commented Feb 26, 2026

Replace bare except clauses with except Exception.


Note

Low Risk
Low risk: only narrows doctest error handling from catching all throwables to catching standard exceptions, without changing core logic or APIs.

Overview
Updates doctests/query_em.py to replace three bare except: blocks with except Exception: in query examples that fall back when certain Redis query syntaxes are unsupported, avoiding catching non-exception throwables (e.g., KeyboardInterrupt, SystemExit) while keeping the same fallback behavior.

Written by Cursor Bugbot for commit 326c6cc. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown
Collaborator

@petyaslavova petyaslavova left a comment

Choose a reason for hiding this comment

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

LGTM.

@petyaslavova petyaslavova merged commit 5b0303b into redis:master Mar 4, 2026
64 checks passed
@petyaslavova petyaslavova added the maintenance Maintenance (CI, Releases, etc) label Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance (CI, Releases, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants