handle exceptions when opening device

This commit is contained in:
Thomas Vander Stichele
2009-12-09 17:37:19 +00:00
parent fa17065ae3
commit ace1a096bf

View File

@@ -80,7 +80,12 @@ CD in the AccurateRip database."""
# first get the Table Of Contents of the CD
t = cdrdao.ReadTOCTask(device=self.options.device)
runner.run(t)
try:
runner.run(t)
except cdrdao.DeviceOpenException, e:
self.error(e.msg)
return 3
table = t.table
self.debug("CDDB disc id: %r", table.getCDDBDiscId())