Skip to content

fix: Replace bare except with except Exception - #14517

Open
Ricardo-M-L wants to merge 1 commit into
huggingface:mainfrom
Ricardo-M-L:fix/replace-bare-except-with-exception-clean
Open

fix: Replace bare except with except Exception#14517
Ricardo-M-L wants to merge 1 commit into
huggingface:mainfrom
Ricardo-M-L:fix/replace-bare-except-with-exception-clean

Conversation

@Ricardo-M-L

Copy link
Copy Markdown
Contributor

Clean rebase

Bare `except:` clauses catch `SystemExit` and `KeyboardInterrupt`,
preventing graceful shutdown and making the process uninterruptible.

Replace with `except Exception:` which preserves the original
error-handling behavior while allowing system-exiting exceptions
to propagate.

Affected locations:
- utils/hub_utils.py:301 — fallback download path
- experimental/rl/value_guided_sampling.py:60,66 — dataset stat computation

Signed-off-by: Ricardo-M-L <Sibyl_Hartmanbnb@webname.com>
@github-actions github-actions Bot added utils experimental size/S PR with diff < 50 LOC labels Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi @Ricardo-M-L, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Fixes #1234) to the PR description so the issue is linked. See the contribution guide for more details. If this PR intentionally does not fix a tracked issue, a maintainer can add the no-issue-needed label to silence this reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

experimental size/S PR with diff < 50 LOC utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant