validate: Do not exit when we can not discover a result file

Loggable.error actually exit the process, it is not what we want!

+ Avoid a backtrace
This commit is contained in:
Thibault Saunier 2014-09-19 09:13:13 +02:00
parent 4814110a86
commit e2d8096cb7

View file

@ -562,6 +562,10 @@ class GstValidateEncodingTestInterface(object):
def check_encoded_file(self):
result_descriptor = GstValidateMediaDescriptor.new_from_uri(
self.dest_file)
if result_descriptor is None:
return (Result.FAILED, "Could not discover encoded file %s"
% self.dest_file)
duration = result_descriptor.get_duration()
orig_duration = self.media_descriptor.get_duration()
tolerance = self._duration_tolerance
@ -1182,7 +1186,7 @@ class GstValidateMediaDescriptor(MediaDescriptor):
if verbose:
printc("Result: Failed", Colors.FAIL)
else:
loggable.error("Exception: %s", e)
loggable.warning("GstValidateMediaDescriptor", "Exception: %s" % e)
return None
if verbose: