Skip to content

fix: handle ValueError from null bytes and replace sys.exit with exceptions (fixes #319, #317) - #341

Closed
KooshaPari wants to merge 1 commit into
simonw:mainfrom
KooshaPari:fix-319-valueerror
Closed

KooshaPari wants to merge 1 commit into
simonw:mainfrom
KooshaPari:fix-319-valueerror

Conversation

@KooshaPari

Copy link
Copy Markdown

Fixes #319, fixes #317

Changes

  • Added input validation to reject null bytes in range_spec
  • Added range format validation (empty parts, empty spec)
  • Replaced sys.exit(1) in extract_issue_numbers() with raised exceptions (ValueError, RuntimeError)
  • Error handling moved to __main__ block, making the function safe for import by MCP servers
  • Added empty result handling (returns empty string instead of empty list)

Copilot AI lite review requested due to automatic review settings September 13, 2026 05:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@KooshaPari KooshaPari closed this by deleting the head repository Sep 14, 2026
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.

ValueError not handled Dangerous sys.exit(1) call

2 participants