[SCM] morituri/master: * morituri/rip/main.py: Give a nice error message if cdrdao cannot read the disc. Fixes #29.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:09:25 UTC 2014


The following commit has been merged in the master branch:
commit ddb70f32e42402367f31d4aea49164d54b61a3b9
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Sun May 22 15:24:14 2011 +0000

    	* morituri/rip/main.py:
    	  Give a nice error message if cdrdao cannot read the disc.
    	  Fixes #29.

diff --git a/ChangeLog b/ChangeLog
index 34a2518..1ce0954 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2011-05-22  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+	* morituri/rip/main.py:
+	  Give a nice error message if cdrdao cannot read the disc.
+	  Fixes #29.
+
+2011-05-22  Thomas Vander Stichele  <thomas at apestaart dot org>
+
 	* morituri/program/cdparanoia.py:
 	  Since stop can be same as start, add + 1 to progress calculation.
 	  Fixes #37.
diff --git a/morituri/rip/main.py b/morituri/rip/main.py
index a31ee55..464d148 100644
--- a/morituri/rip/main.py
+++ b/morituri/rip/main.py
@@ -23,6 +23,14 @@ def main(argv):
             sys.stderr.write('rip: error: missing dependency "%s"\n' %
                 e.exception.dependency)
             return 255
+        # FIXME: move this exception
+        from morituri.program import cdrdao
+        if isinstance(e.exception, cdrdao.DeviceOpenException):
+            sys.stderr.write("""rip: error: cannot read CD from drive.
+cdrdao says:
+%s
+""" % e.exception.msg)
+            return 255
         raise
 
     if ret is None:

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list