-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
cli: invalid --timeout values raise a raw parser exception #2866
Copy link
Copy link
Open
Description
Summary
Passing a non-numeric timeout to the CLI currently raises a raw ValueError from float(value) instead of surfacing an argparse validation error.
Reproduction
sherlock --timeout abc testuserCurrent behavior
The CLI blows up while parsing arguments instead of reporting a normal argument --timeout: ... validation error.
Expected behavior
Invalid timeout inputs should consistently be converted into ArgumentTypeError, just like zero or negative values already are, so argparse can render a clean user-facing error message.
Proposed fix
Wrap the float(value) conversion in timeout_check() and re-raise invalid inputs as ArgumentTypeError, then add a regression test for invalid timeout values.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels