From 37ab5ec2e239801d50f510ec34c77339a85ee95b Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 19 Jul 2020 15:23:02 +0200 Subject: [benchmark] add type hint for result of a benchmark run --- allocbench/benchmark.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/allocbench/benchmark.py b/allocbench/benchmark.py index 0a03a78..53430cb 100644 --- a/allocbench/benchmark.py +++ b/allocbench/benchmark.py @@ -627,6 +627,10 @@ class Benchmark: os.chdir(run_dir) logger.debug("\nChange cwd to: %s", run_dir) + # We only check returncode, stderr and stderr which are available + # in CompletedProcess and CalledProcessError. + res: Optional[Union[subprocess.CompletedProcess, + subprocess.CalledProcessError]] = None try: res = run_cmd(argv, capture=True) except subprocess.CalledProcessError as err: -- cgit v1.2.3