diff --git a/morituri/common/checksum.py b/morituri/common/checksum.py index b027be5..9a943e1 100644 --- a/morituri/common/checksum.py +++ b/morituri/common/checksum.py @@ -163,8 +163,11 @@ class ChecksumTask(log.Loggable, gstreamer.GstPipelineTask): self.debug("checksum: %08X", self._checksum) self.debug("bytes: %d", self._bytes) if self._frameEnd != last: - print 'ERROR: did not get all frames, %d of %d missing' % ( + msg = 'did not get all frames, %d of %d missing' % ( self._frameEnd - last, self._frameEnd) + self.warning(msg) + self.setException(common.MissingFrames(msg)) + return self.checksum = self._checksum diff --git a/morituri/common/common.py b/morituri/common/common.py index 7245179..6b6ff65 100644 --- a/morituri/common/common.py +++ b/morituri/common/common.py @@ -170,6 +170,12 @@ class MissingDependencyException(Exception): class EmptyError(Exception): pass +class MissingFrames(Exception): + """ + Less frames decoded than expected. + """ + pass + def shrinkPath(path): """