Skip to content

fix(rule_translator): replace bare except with except AttributeError#170

Open
SoundMatt wants to merge 1 commit into
COVESA:masterfrom
SoundMatt:fix/rule-translator-bare-except
Open

fix(rule_translator): replace bare except with except AttributeError#170
SoundMatt wants to merge 1 commit into
COVESA:masterfrom
SoundMatt:fix/rule-translator-bare-except

Conversation

@SoundMatt

Copy link
Copy Markdown

The bare except: clause in transform_value_common catches everything — including KeyboardInterrupt, SystemExit, and GeneratorExit — which can make the program unresponsive to Ctrl-C or swallow crash signals. The intent is clearly to handle the case where the OrderedDict value has no .name attribute. Narrow to except AttributeError.

The bare `except:` block catches everything including `KeyboardInterrupt`,
`SystemExit`, and `GeneratorExit`.  The intent is clearly to handle the
case where the `OrderedDict` value has no `.name` attribute, so narrow
it to `except AttributeError`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.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