replace cdrdao.py with much simpler version (#52)
* replace cdrdao.py with much simpler version * more pythonic syntax for cdrdao.read_toc(fast_toc=) switching * fix silly typo
This commit is contained in:
committed by
JoeLametta
parent
8721ba1caf
commit
d7f8557426
@@ -10,7 +10,6 @@ from morituri.common import log, logcommand, common, config, directory
|
||||
from morituri.configure import configure
|
||||
from morituri.extern.command import command
|
||||
from morituri.extern.task import task
|
||||
from morituri.program import cdrdao
|
||||
from morituri.rip import cd, offset, drive, image, accurip, debug
|
||||
|
||||
|
||||
@@ -33,13 +32,6 @@ def main():
|
||||
sys.stderr.write('rip: error: missing dependency "%s"\n' %
|
||||
e.exception.dependency)
|
||||
return 255
|
||||
# FIXME: move this exception
|
||||
if isinstance(e.exception, cdrdao.DeviceOpenException):
|
||||
sys.stderr.write("""rip: error: cannot read CD from drive.
|
||||
cdrdao says:
|
||||
%s
|
||||
""" % e.exception.msg)
|
||||
return 255
|
||||
|
||||
if isinstance(e.exception, common.EmptyError):
|
||||
log.debug('main',
|
||||
|
||||
@@ -100,14 +100,7 @@ CD in the AccurateRip database."""
|
||||
prog.unmountDevice(device)
|
||||
|
||||
# first get the Table Of Contents of the CD
|
||||
t = cdrdao.ReadTOCTask(device=device)
|
||||
|
||||
try:
|
||||
runner.run(t)
|
||||
except cdrdao.DeviceOpenException, e:
|
||||
self.error(e.msg)
|
||||
return 3
|
||||
|
||||
t = cdrdao.ReadTOCTask(device)
|
||||
table = t.table
|
||||
|
||||
self.debug("CDDB disc id: %r", table.getCDDBDiscId())
|
||||
|
||||
Reference in New Issue
Block a user