From ead3eb98a4f5aa2398ed9c02a35bc4aae49416ce Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 6 Feb 2014 17:23:10 +0100 Subject: [PATCH] validate:tools:launcher: Take into account the position value when rendering When rendering a files we try to use the size of the outputed file to determine wether we are timeout or not, but if that fails try to check the position --- validate/tools/launcher/baseclasses.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/validate/tools/launcher/baseclasses.py b/validate/tools/launcher/baseclasses.py index 4d20250eef..75c67eb8a1 100644 --- a/validate/tools/launcher/baseclasses.py +++ b/validate/tools/launcher/baseclasses.py @@ -351,7 +351,11 @@ class GstValidateTest(Test): def get_current_size(self): position = self.get_current_position() - size = os.stat(urlparse.urlparse(self.dest_file).path).st_size + try: + size = os.stat(urlparse.urlparse(self.dest_file).path).st_size + except OSError as e: + return position + self.debug("Size: %s" % size) return size