* morituri/image/image.py:
Fix AudioLengthTask for the case where we don't have the decoder, by instead of doing get_state, waiting for an ASYNC_DONE or ERROR message. Properly raise a gst.GError in that case. * morituri/common/task.py: Add some debug. * morituri/test/test_image_image.py: After this fix, we now catch the TYPE_NOT_FOUND because of an empty stream instead of the later gst.QueryError. * morituri/test/test_common_encode.py: Let us know what it is if not a gst.QueryError.
This commit is contained in:
@@ -359,6 +359,7 @@ class SyncRunner(TaskRunner, ITaskListener):
|
||||
# only start the task after going into the mainloop,
|
||||
# otherwise the task might complete before we are in it
|
||||
gobject.timeout_add(0L, self._startWrap, self._task)
|
||||
self.debug('run loop')
|
||||
self._loop.run()
|
||||
|
||||
self.debug('done running task %r', task)
|
||||
@@ -372,6 +373,7 @@ class SyncRunner(TaskRunner, ITaskListener):
|
||||
# wrap task start such that we can report any exceptions and
|
||||
# never hang
|
||||
try:
|
||||
self.debug('start task %r' % task)
|
||||
task.start(self)
|
||||
except Exception, e:
|
||||
# getExceptionMessage uses global exception state that doesn't
|
||||
|
||||
Reference in New Issue
Block a user