Skip to content

fix: replace bare except with except Exception in v1.py#487

Open
harshadkhetpal wants to merge 1 commit intoglobocom:masterfrom
harshadkhetpal:fix/bare-except-v1
Open

fix: replace bare except with except Exception in v1.py#487
harshadkhetpal wants to merge 1 commit intoglobocom:masterfrom
harshadkhetpal:fix/bare-except-v1

Conversation

@harshadkhetpal
Copy link
Copy Markdown

Replace bare except: with except Exception: in _load_template_file (line 597).

Bare except: catches all exceptions including SystemExit, KeyboardInterrupt, and GeneratorExit, which can mask critical errors and make debugging harder (PEP 8 E722).

Since this block handles a fallback case without re-raising the original exception, except Exception: is the correct narrower alternative. No behavioral change for normal operation.

Replace bare `except:` with `except Exception:` in _load_template_file (line 597).

Bare `except:` catches all exceptions including SystemExit, KeyboardInterrupt, and GeneratorExit, which can mask critical errors and make debugging harder (PEP 8 E722).

Since this block handles a fallback case without re-raising the original exception, `except Exception:` is the correct narrower alternative. No behavioral change for normal operation.
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