From 8802c5482edf150a94ce430d74ad3239ce803780 Mon Sep 17 00:00:00 2001 From: JoeLametta Date: Fri, 29 May 2020 16:24:30 +0000 Subject: [PATCH] Improve error message for unconfigured drive offset Fixes #478. Signed-off-by: JoeLametta --- whipper/command/cd.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/whipper/command/cd.py b/whipper/command/cd.py index daa11f0..10a646f 100644 --- a/whipper/command/cd.py +++ b/whipper/command/cd.py @@ -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(