Skip to content

fix: replace bare except with except Exception in EnvironmentGetByEqu…#485

Open
harshadkhetpal wants to merge 1 commit intoglobocom:masterfrom
harshadkhetpal:patch-1
Open

fix: replace bare except with except Exception in EnvironmentGetByEqu…#485
harshadkhetpal wants to merge 1 commit intoglobocom:masterfrom
harshadkhetpal:patch-1

Conversation

@harshadkhetpal
Copy link
Copy Markdown

…ipResource

Replace bare except: clause with except Exception: on line 79.

A bare except: catches all exceptions including SystemExit, KeyboardInterrupt, and GeneratorExit, which can mask critical errors and make debugging harder. Since this block simply sets a fallback value without re-raising, except Exception: is the correct fix (PEP 8 E722).

No behavioral change for normal operation — only system-level exceptions are no longer silently swallowed.

…ipResource

Replace bare `except:` clause with `except Exception:` on line 79.

A bare `except:` catches all exceptions including `SystemExit`, `KeyboardInterrupt`, and `GeneratorExit`, which can mask critical errors and make debugging harder. Since this block simply sets a fallback value without re-raising, `except Exception:` is the correct fix (PEP 8 E722).

No behavioral change for normal operation — only system-level exceptions are no longer silently swallowed.
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