From ace1a096bf9dfa74f21db659c1c52a30899f4b56 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 9 Dec 2009 17:37:19 +0000 Subject: [PATCH] handle exceptions when opening device --- morituri/rip/offset.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/morituri/rip/offset.py b/morituri/rip/offset.py index f9aa971..261a96d 100644 --- a/morituri/rip/offset.py +++ b/morituri/rip/offset.py @@ -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())