#536
fix(legacy): handle cancelled source selection
Summary
- Fixes: When the source selector is cancelled with Ctrl-D, prompt_select returns None and input_handler raises TypeError while evaluating int(None) instead of returning to the main menu.
- Root cause: The next-step input path assumes prompt_select always returns a numeric option and indexes options without handling its documented no-result exit path.
Closes #513
Regression evidence
-
Before:
uv run python -m pytest tests/legacy/test_pentest_gpt.py -qexited1 -
After:
uv run python -m pytest tests/legacy/test_pentest_gpt.py -qexited0
Verification
uv run python -m pytest tests/legacy/ -qmake ci
Scope
- 2 files changed, +27 / -0 lines