Address issue #23
Should work. In the future this commit could be improved providing a way to override pycdio hard dependency (command line argument).
This commit is contained in:
@@ -168,11 +168,9 @@ class _CD(logcommand.LogCommand):
|
|||||||
self.program.result.release = \
|
self.program.result.release = \
|
||||||
cdio.Device(self.device).get_hwinfo()
|
cdio.Device(self.device).get_hwinfo()
|
||||||
except ImportError:
|
except ImportError:
|
||||||
self.stdout.write(
|
raise ImportError("Pycdio module import failed.\n"
|
||||||
'WARNING: pycdio not installed, cannot identify drive\n')
|
"This is a hard dependency: if not available "
|
||||||
self.program.result.vendor = 'Unknown'
|
"please install it")
|
||||||
self.program.result.model = 'Unknown'
|
|
||||||
self.program.result.release = 'Unknown'
|
|
||||||
|
|
||||||
self.doCommand()
|
self.doCommand()
|
||||||
|
|
||||||
@@ -273,11 +271,13 @@ Log files will log the path to tracks relative to this directory.
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if options.offset is None:
|
if options.offset is None:
|
||||||
options.offset = 0
|
raise ValueError("Drive offset is unconfigured.\n"
|
||||||
self.stdout.write("""WARNING: using default offset %d.
|
"Please install pycdio and run 'rip offset "
|
||||||
Install pycdio and run 'rip offset find' to detect your drive's offset.
|
"find' to detect your drive's offset or set it "
|
||||||
""" %
|
"manually in the configuration file. It can "
|
||||||
options.offset)
|
"also be specified at runtime using the "
|
||||||
|
"'--offset=value' argument")
|
||||||
|
|
||||||
if self.options.output_directory is None:
|
if self.options.output_directory is None:
|
||||||
self.options.output_directory = os.getcwd()
|
self.options.output_directory = os.getcwd()
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user