scanner: fix newby logic error

This commit is contained in:
SeeSpotRun 2016-03-16 08:42:34 +10:00 committed by Thomas Adamcik
parent 2d6f00b912
commit c972ecd1f2

View File

@ -192,7 +192,7 @@ def _process(pipeline, timeout_ms):
duration = duration // Gst.MSECOND duration = duration // Gst.MSECOND
else: else:
duration = None duration = None
if (tags and duration if (tags and duration is not None
# workaround for # workaround for
# https://bugzilla.gnome.org/show_bug.cgi?id=763553: # https://bugzilla.gnome.org/show_bug.cgi?id=763553:
# try to start pipeline playing; if it doesn't then # try to start pipeline playing; if it doesn't then
@ -213,7 +213,7 @@ def _process(pipeline, timeout_ms):
# workaround for https://bugzilla.gnome.org/show_bug.cgi?id=763553: # workaround for https://bugzilla.gnome.org/show_bug.cgi?id=763553:
# if we got what we want then stop playing (and wait for ASYNC_DONE) # if we got what we want then stop playing (and wait for ASYNC_DONE)
if tags and duration: if tags and duration is not None:
pipeline.set_state(Gst.State.PAUSED) pipeline.set_state(Gst.State.PAUSED)
raise exceptions.ScannerError('Timeout after %dms' % timeout_ms) raise exceptions.ScannerError('Timeout after %dms' % timeout_ms)