[SCM] morituri/master: * morituri/program/cdparanoia.py: Add some debug. * morituri/common/encode.py: Add more debug. Handle the case where peak is full scale, and peakdB thus 0, which triggered not setting self.peak.

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


The following commit has been merged in the master branch:
commit e124c79c64d93bb6d372de34ceb6bf226388f2e8
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Thu Apr 8 21:06:52 2010 +0000

    	* morituri/program/cdparanoia.py:
    	  Add some debug.
    	* morituri/common/encode.py:
    	  Add more debug.
    	  Handle the case where peak is full scale, and peakdB thus 0,
    	  which triggered not setting self.peak.

diff --git a/ChangeLog b/ChangeLog
index ece9a19..b7a22e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-04-08  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+	* morituri/program/cdparanoia.py:
+	  Add some debug.
+	* morituri/common/encode.py:
+	  Add more debug.
+	  Handle the case where peak is full scale, and peakdB thus 0,
+	  which triggered not setting self.peak.
+
 2010-04-06  Thomas Vander Stichele  <thomas at apestaart dot org>
 
 	patch by: Peter Oliver.
diff --git a/morituri/common/encode.py b/morituri/common/encode.py
index 5144f2e..d9660fb 100644
--- a/morituri/common/encode.py
+++ b/morituri/common/encode.py
@@ -123,6 +123,8 @@ class EncodeTask(task.Task):
     @type  peak: float
     """
 
+    logCategory = 'EncodeTask'
+
     description = 'Encoding'
     peak = None
 
@@ -244,6 +246,7 @@ class EncodeTask(task.Task):
 
         for p in s['peak']:
             if self._peakdB < p:
+                self.log('higher peakdB found, now %r', self._peakdB)
                 self._peakdB = p
 
     def stop(self):
@@ -256,5 +259,8 @@ class EncodeTask(task.Task):
         self.debug('set state to NULL')
         task.Task.stop(self)
 
-        if self._peakdB:
+        if self._peakdB is not None:
+            self.debug('peakdB %r', self._peakdB)
             self.peak = math.sqrt(math.pow(10, self._peakdB / 10.0))
+        else:
+            self.warning('No peak found, something went wrong!')
diff --git a/morituri/program/cdparanoia.py b/morituri/program/cdparanoia.py
index 3c4533b..5961eb0 100644
--- a/morituri/program/cdparanoia.py
+++ b/morituri/program/cdparanoia.py
@@ -405,6 +405,7 @@ class ReadVerifyTrackTask(task.MultiSeparateTask):
         if not self.exception:
             self.quality = max(self.tasks[0].quality, self.tasks[2].quality)
             self.peak = self.tasks[4].peak
+            self.debug('peak: %r', self.peak)
 
             self.testchecksum = c1 = self.tasks[1].checksum
             self.copychecksum = c2 = self.tasks[3].checksum
@@ -424,5 +425,7 @@ class ReadVerifyTrackTask(task.MultiSeparateTask):
                 shutil.move(self._tmppath, self.path)
             except Exception, e:
                 self._exception = e
+        else:
+            self.debug('stop: exception %r', self.exception)
 
         task.MultiSeparateTask.stop(self)

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list