Repository navigation
Conversation
Missing drives were reported with logger.critical() and then raised as IOError, which nothing catches, so users saw the log line followed by a full traceback. Raise SystemExit(3) instead, as the removed comment says whipper used to do, for both 'No CD-DA drives found!' and a --device path that does not exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Mirko Köster <git@mirkokoester.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When no drive is found (or
-dpoints at a missing device), whipper logs the error and then raises an uncaughtIOError, so the user sees a full traceback after the message:CRITICAL:whipper.command.basecommand:No CD-DA drives found!
Traceback (most recent call last):
...
OSError: No CD-DA drives found!
This raises
SystemExit(3)instead (the removed comment noted whipper used to exit with 3 here), matching howincorrect subcommandis already handled a few lines below. Includes unit tests for both cases.Related to #164, which shows the same traceback for
whipper cd --help; this PR does not make help work without a drive.🤖 Generated with Claude Code