[SCM] morituri/master: Make rip cd info not eject. Fixes #35.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:10:08 UTC 2014


The following commit has been merged in the master branch:
commit 6aff8296bf25b26679bd5754dcf45de2465581c6
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Tue Jul 30 11:32:41 2013 +0200

    Make rip cd info not eject.  Fixes #35.

diff --git a/morituri/rip/cd.py b/morituri/rip/cd.py
index e927f62..c2c1a94 100644
--- a/morituri/rip/cd.py
+++ b/morituri/rip/cd.py
@@ -43,8 +43,11 @@ class _CD(logcommand.LogCommand):
 
     """
     @type program: L{program.Program}
+    @ivar eject:   whether to eject the drive after completing
     """
 
+    eject = True
+
     def addOptions(self):
         # FIXME: have a cache of these pickles somewhere
         self.parser.add_option('-T', '--toc-pickle',
@@ -94,7 +97,7 @@ class _CD(logcommand.LogCommand):
                 self.stdout.write('FreeDB identifies disc as %s\n' % cddbmd)
 
             # also used by rip cd info
-            if not getattr(self.options, 'unknown', False):
+            if not getattr(self.options, 'unknown', False) and self.eject:
                 self.program.ejectDevice(self.device)
                 return -1
 
@@ -150,7 +153,8 @@ class _CD(logcommand.LogCommand):
 
         self.doCommand()
 
-        self.program.ejectDevice(self.device)
+        if self.eject:
+            self.program.ejectDevice(self.device)
 
     def doCommand(self):
         pass
@@ -159,6 +163,8 @@ class _CD(logcommand.LogCommand):
 class Info(_CD):
     summary = "retrieve information about the currently inserted CD"
 
+    eject = False
+
 
 class Rip(_CD):
     summary = "rip CD"

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list