Improve error message for unconfigured drive offset

Fixes #478.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This commit is contained in:
JoeLametta
2020-05-29 16:24:30 +00:00
parent 0a960d991b
commit 8802c5482e

View File

@@ -317,12 +317,12 @@ Log files will log the path to tracks relative to this directory.
validate_template(self.options.disc_template, 'disc')
if self.options.offset is None:
raise ValueError("Drive offset is unconfigured.\n"
"Please install pycdio and run 'whipper offset "
"find' to detect your drive's offset or set it "
"manually in the configuration file. It can "
"also be specified at runtime using the "
"'--offset=value' argument")
raise SystemExit(
"Error: drive offset unconfigured. Please install pycdio and "
"run 'whipper offset find' to detect your drive's offset or "
"set it manually in the configuration file. It can also be "
"specified at runtime using the '--offset=value' argument"
)
if self.options.working_directory is not None:
self.options.working_directory = os.path.expanduser(