* doc/release:
Document having clean test run. * morituri/common/encode.py: Catch and properly stop on gst.QueryError. Don't set peak in stop if we had an error. * morituri/test/test_common_encode.py: * morituri/test/test_common_renamer.py: * morituri/test/test_image_cue.py: Clean up after tests.
This commit is contained in:
@@ -175,7 +175,13 @@ class EncodeTask(task.Task):
|
||||
|
||||
# get length
|
||||
self.debug('query duration')
|
||||
length, qformat = tagger.query_duration(gst.FORMAT_DEFAULT)
|
||||
try:
|
||||
length, qformat = tagger.query_duration(gst.FORMAT_DEFAULT)
|
||||
except gst.QueryError, e:
|
||||
self.setException(e)
|
||||
self.stop()
|
||||
return
|
||||
|
||||
# wavparse 0.10.14 returns in bytes
|
||||
if qformat == gst.FORMAT_BYTES:
|
||||
self.debug('query returned in BYTES format')
|
||||
@@ -250,4 +256,5 @@ class EncodeTask(task.Task):
|
||||
self.debug('set state to NULL')
|
||||
task.Task.stop(self)
|
||||
|
||||
self.peak = math.sqrt(math.pow(10, self._peakdB / 10.0))
|
||||
if self._peakdB:
|
||||
self.peak = math.sqrt(math.pow(10, self._peakdB / 10.0))
|
||||
|
||||
Reference in New Issue
Block a user