Skip to content

fix: replace bare except with except Exception - #611

Open
TrueFurina wants to merge 1 commit into
psf:masterfrom
TrueFurina:master
Open

fix: replace bare except with except Exception#611
TrueFurina wants to merge 1 commit into
psf:masterfrom
TrueFurina:master

Conversation

@TrueFurina

Copy link
Copy Markdown

Summary

requests_html.py __convert() (used for cookie conversion) has a bare
except: that swallows everything, including KeyboardInterrupt/SystemExit,
and hides programming errors as if they were expected eval failures.

Replace with except Exception: — same intended behavior (return an empty
kv on eval failure), but unexpected exceptions now propagate.

Verification

  • python -m py_compile requests_html.py → OK
  • grep -c "except:" requests_html.py → 0 remaining bare handlers

Files changed

  • requests_html.py (1 line)

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