Skip to content

fix: replace bare except with except Exception in Python scripts#40319

Open
srpatcha wants to merge 4 commits intomicrosoft:masterfrom
srpatcha:fix/bare-except-python-scripts
Open

fix: replace bare except with except Exception in Python scripts#40319
srpatcha wants to merge 4 commits intomicrosoft:masterfrom
srpatcha:fix/bare-except-python-scripts

Conversation

@srpatcha
Copy link
Copy Markdown

Changes

fix: replace bare except with except Exception in Python scripts

Signed-off with GPG.

Bare except clauses catch SystemExit and KeyboardInterrupt
which prevents clean process termination.
@srpatcha srpatcha requested a review from a team as a code owner April 25, 2026 02:20
srpatcha and others added 3 commits April 24, 2026 21:59
subset() returned True when a key was missing from the outer dict,
silently bypassing CI validation. Fixed to return False. Also replaced
bare except clauses with 'except Exception' to avoid catching
SystemExit and KeyboardInterrupt.

Signed-off-by: Srikanth Patchava <spatchava@meta.com>
Signed-off-by: Srikanth Patchava <srikanth.patchava@outlook.com>
Signed-off-by: Srikanth Patchava <spatchava@meta.com>
Signed-off-by: Srikanth Patchava <spatchava@meta.com>
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.

1 participant