diff --git a/wlauto/utils/misc.py b/wlauto/utils/misc.py index 40261ff8..121fac68 100644 --- a/wlauto/utils/misc.py +++ b/wlauto/utils/misc.py @@ -81,7 +81,7 @@ def check_output(command, timeout=None, ignore=None, **kwargs): ignore = [] elif isinstance(ignore, int): ignore = [ignore] - elif not isinstance(ignore, list): + elif not isinstance(ignore, list) and ignore != 'all': message = 'Invalid value for ignore parameter: "{}"; must be an int or a list' raise ValueError(message.format(ignore)) if 'stdout' in kwargs: @@ -111,7 +111,7 @@ def check_output(command, timeout=None, ignore=None, **kwargs): if retcode: if retcode == -9: # killed, assume due to timeout callback raise TimeoutError(command, output='\n'.join([output, error])) - elif retcode not in ignore: + elif ignore != 'all' and retcode not in ignore: raise subprocess.CalledProcessError(retcode, command, output='\n'.join([output, error])) return output, error diff --git a/wlauto/workloads/telemetry/__init__.py b/wlauto/workloads/telemetry/__init__.py index eb738598..2201841a 100644 --- a/wlauto/workloads/telemetry/__init__.py +++ b/wlauto/workloads/telemetry/__init__.py @@ -133,7 +133,7 @@ class Telemetry(Workload): def run(self, context): self.logger.debug(self.command) - self.raw_output, _ = check_output(self.command, shell=True, timeout=self.run_timeout, ignore=range(256)) + self.raw_output, _ = check_output(self.command, shell=True, timeout=self.run_timeout, ignore='all') def update_result(self, context): # pylint: disable=too-many-locals if not self.raw_output: