[SCM] morituri/master: * morituri/program/cdparanoia.py: Add copy and test CRC's to object.

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


The following commit has been merged in the master branch:
commit 85e90585946b5b9a5d08f9d334d89cb36d05a72e
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Sat May 23 19:47:58 2009 +0000

    	* morituri/program/cdparanoia.py:
    	  Add copy and test CRC's to object.

diff --git a/ChangeLog b/ChangeLog
index 156b8f4..1d724ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-05-23  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+	* morituri/program/cdparanoia.py:
+	  Add copy and test CRC's to object.
+
+2009-05-23  Thomas Vander Stichele  <thomas at apestaart dot org>
+
 	* morituri/common/Makefile.am:
 	* morituri/common/drive.py (added):
 	  Add drive module.
diff --git a/morituri/program/cdparanoia.py b/morituri/program/cdparanoia.py
index 100510f..19ffa93 100644
--- a/morituri/program/cdparanoia.py
+++ b/morituri/program/cdparanoia.py
@@ -224,8 +224,10 @@ class ReadVerifyTrackTask(task.MultiSeparateTask):
     """
     I am a task that reads and verifies a track using cdparanoia.
 
-    @ivar path:     the path where the file is to be stored.
-    @ivar checksum: the checksum of the track.
+    @ivar path:         the path where the file is to be stored.
+    @ivar checksum:     the checksum of the track; set if they match.
+    @ivar testchecksum: the test checksum of the track.
+    @ivar copychecksum: the copy checksum of the track.
     """
 
     def __init__(self, path, table, start, stop, offset=0, device=None):
@@ -264,17 +266,18 @@ class ReadVerifyTrackTask(task.MultiSeparateTask):
 
     def stop(self):
         if not self.exception:
-            c1 = self.tasks[1].checksum
-            c2 = self.tasks[3].checksum
+            self.testchecksum = c1 = self.tasks[1].checksum
+            self.copychecksum = c2 = self.tasks[3].checksum
             if c1 == c2:
                 self.info('Checksums match, %08x' % c1)
-                try:
-                    shutil.move(self._tmppath, self.path)
-                    self.checksum = checksum
-                except Exception, e:
-                    self._exception = e
+                self.checksum = self.testchecksum
             else:
-                print 'ERROR: read and verify failed'
-                self.checksum = None
+                self.error('read and verify failed')
+
+            try:
+                shutil.move(self._tmppath, self.path)
+                self.checksum = checksum
+            except Exception, e:
+                self._exception = e
 
         task.MultiSeparateTask.stop(self)

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list