Make pycdio dependency not overridable
This commit is contained in:
@@ -55,7 +55,7 @@ REQUIREMENTS
|
|||||||
- python musicbrainzngs, for metadata lookup
|
- python musicbrainzngs, for metadata lookup
|
||||||
- python-setuptools, for plugin support
|
- python-setuptools, for plugin support
|
||||||
- python-cddb, for showing but not using disc info if not in MusicBrainz
|
- python-cddb, for showing but not using disc info if not in MusicBrainz
|
||||||
- pycdio, for drive identification (it can be overridden placing a blank file named `PYCDIO_IGNORE` into whipper's config path)
|
- pycdio, for drive identification
|
||||||
- Required for drive offset and caching behavior to be stored in the config file
|
- Required for drive offset and caching behavior to be stored in the config file
|
||||||
|
|
||||||
Additionally, if you're building from a git checkout:
|
Additionally, if you're building from a git checkout:
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import gobject
|
|||||||
gobject.threads_init()
|
gobject.threads_init()
|
||||||
|
|
||||||
from morituri.common import logcommand, common, accurip, gstreamer
|
from morituri.common import logcommand, common, accurip, gstreamer
|
||||||
from morituri.common import drive, program, task, directory
|
from morituri.common import drive, program, task
|
||||||
from morituri.result import result
|
from morituri.result import result
|
||||||
from morituri.program import cdrdao, cdparanoia
|
from morituri.program import cdrdao, cdparanoia
|
||||||
from morituri.rip import common as rcommon
|
from morituri.rip import common as rcommon
|
||||||
@@ -161,27 +161,15 @@ class _CD(logcommand.LogCommand):
|
|||||||
self.program.result.title = self.program.metadata \
|
self.program.result.title = self.program.metadata \
|
||||||
and self.program.metadata.title \
|
and self.program.metadata.title \
|
||||||
or 'Unknown Title'
|
or 'Unknown Title'
|
||||||
# cdio is optional for now
|
|
||||||
try:
|
try:
|
||||||
import cdio
|
import cdio
|
||||||
_, self.program.result.vendor, self.program.result.model, \
|
_, self.program.result.vendor, self.program.result.model, \
|
||||||
self.program.result.release = \
|
self.program.result.release = \
|
||||||
cdio.Device(self.device).get_hwinfo()
|
cdio.Device(self.device).get_hwinfo()
|
||||||
except ImportError:
|
except ImportError:
|
||||||
d = directory.Directory()
|
raise ImportError("Pycdio module import failed.\n"
|
||||||
path = os.path.dirname(d.getConfig())
|
"This is a hard dependency: if not "
|
||||||
fullPath = os.path.join(path, 'PYCDIO_IGNORE')
|
"available please install it")
|
||||||
if os.path.isfile(fullPath):
|
|
||||||
self.stdout.write(
|
|
||||||
'WARNING: pycdio not installed, cannot identify drive '
|
|
||||||
'(hard dependency overridden)\n')
|
|
||||||
self.program.result.vendor = 'Unknown'
|
|
||||||
self.program.result.model = 'Unknown'
|
|
||||||
self.program.result.release = 'Unknown'
|
|
||||||
else:
|
|
||||||
raise ImportError("Pycdio module import failed.\n"
|
|
||||||
"This is a hard dependency: if not "
|
|
||||||
"available please install it")
|
|
||||||
|
|
||||||
self.doCommand()
|
self.doCommand()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user