[SCM] morituri/master: handle exceptions on verifying empty or half-done tracks

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


The following commit has been merged in the master branch:
commit 697aafc21ddac81e566cef19205cdaba35e4f968
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Mon Jul 22 01:54:00 2013 +0200

    handle exceptions on verifying empty or half-done tracks

diff --git a/morituri/common/program.py b/morituri/common/program.py
index bd9b8f7..921b599 100644
--- a/morituri/common/program.py
+++ b/morituri/common/program.py
@@ -32,6 +32,8 @@ from morituri.common import common, log, mbngs, cache, path
 from morituri.program import cdrdao, cdparanoia
 from morituri.image import image
 
+from morituri.extern.task import task, gstreamer
+
 
 # FIXME: should Program have a runner ?
 
@@ -522,7 +524,17 @@ class Program(log.Loggable):
 
         t = checksum.CRC32Task(trackResult.filename)
 
-        runner.run(t)
+        try:
+            runner.run(t)
+        except task.TaskException, e:
+            if isinstance(e.exception, common.MissingFrames):
+                self.warning('missing frames for %r' % trackResult.filename)
+                return False
+            elif isinstance(e.exception, gstreamer.GstException):
+                self.warning('GstException %r' % (e.exception, ))
+                return False
+            else:
+                raise
 
         ret = trackResult.testcrc == t.checksum
         log.debug('program',

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list