[SCM] morituri/master: * morituri/rip/drive.py: rip drive list now shows configured read offset if applicable.

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


The following commit has been merged in the master branch:
commit d096db1e7c963684055768cbcbea92a3ae691c5e
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Sun Dec 2 12:25:49 2012 +0000

    	* morituri/rip/drive.py:
    	  rip drive list now shows configured read offset if applicable.

diff --git a/ChangeLog b/ChangeLog
index df751f3..5d60e1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-12-02  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+	* morituri/rip/drive.py:
+	  rip drive list now shows configured read offset if applicable.
+
+2012-12-02  Thomas Vander Stichele  <thomas at apestaart dot org>
+
 	* morituri/rip/cd.py:
 	  Use configured read offset for drive if possible.
 	  Fixes #76.
diff --git a/morituri/rip/drive.py b/morituri/rip/drive.py
index b5f2b6c..33e5998 100644
--- a/morituri/rip/drive.py
+++ b/morituri/rip/drive.py
@@ -31,9 +31,9 @@ class List(logcommand.LogCommand):
         paths = drive.getAllDevicePaths()
 
         if not paths:
-            print 'No drives found.'
-            print 'Create /dev/cdrom if you have a CD drive, '
-            print 'or install pycdio for better detection.'
+            self.stdout.write('No drives found.\n')
+            self.stdout.write('Create /dev/cdrom if you have a CD drive, \n')
+            self.stdout.write('or install pycdio for better detection.\n')
 
             return
 
@@ -46,11 +46,20 @@ class List(logcommand.LogCommand):
 
         for path in paths:
             vendor, model, release = drive.getDeviceInfo(path)
-            print "drive: %s, vendor: %s, model: %s, release: %s" % (
-                path, vendor, model, release)
+            self.stdout.write(
+                "drive: %s, vendor: %s, model: %s, release: %s\n" % (
+                path, vendor, model, release))
+
+            try:
+                offset = self.getRootCommand().config.getReadOffset(
+                    vendor, model, release)
+                self.stdout.write(
+                    "       Configured read offset: %d\n" % offset)
+            except KeyError:
+                pass
 
         if not paths:
-            print 'No drives found.'
+            self.stdout.write('No drives found.\n')
 
 
 class Drive(logcommand.LogCommand):

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list