Skip to content

fix: replace bare except clauses in WinCOMReceiverBasic#309

Open
nuthalapativarun wants to merge 1 commit intomicrosoft:pre-releasefrom
nuthalapativarun:fix/bare-except-win-com-receiver
Open

fix: replace bare except clauses in WinCOMReceiverBasic#309
nuthalapativarun wants to merge 1 commit intomicrosoft:pre-releasefrom
nuthalapativarun:fix/bare-except-win-com-receiver

Conversation

@nuthalapativarun
Copy link
Copy Markdown

Summary

  • Replace bare except: with except Exception: in WinCOMReceiverBasic methods

Changes

ufo/automator/app_apis/basic.py — four methods (full_path, save, save_to_xml, close) used bare except: clauses which catch all exceptions including SystemExit and KeyboardInterrupt. Changed to except Exception: to only suppress non-system exceptions, matching the pattern used elsewhere in the codebase.

Motivation

Bare except: clauses can unintentionally suppress interpreter-level signals and make debugging harder. PEP 8 explicitly recommends against them.

Bare except clauses catch all exceptions including SystemExit and
KeyboardInterrupt, which can mask unexpected errors and make debugging
harder. Replace with except Exception to only catch non-system exceptions
in full_path, save, save_to_xml, and close methods.
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