From 76296c3c4a18c8d14614515e2c71216608a941ff Mon Sep 17 00:00:00 2001 From: Fabian Poggenhans Date: Sat, 30 Jan 2021 12:32:34 +0100 Subject: [PATCH] Fix formatting of test failures on python3 --- scripts/run_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/run_test.py b/scripts/run_test.py index bedd9b3..8c517bc 100644 --- a/scripts/run_test.py +++ b/scripts/run_test.py @@ -105,11 +105,11 @@ def main(argv=sys.argv[1:]): errors = [] for cmd in args.command: stream = sys.stderr if not args.redirect_stderr else sys.stdout - proc = subprocess.Popen(cmd + " | tee", cwd=args.working_dir, shell=True, env=env, stderr=subprocess.PIPE) + proc = subprocess.Popen(cmd + " | tee", cwd=args.working_dir, shell=True, env=env, stderr=subprocess.PIPE, universal_newlines=True) stdout, stderr = proc.communicate() if stderr: print(stderr, file=stream) - errors.append(stderr.decode("utf-8")) + errors.append(stderr) if proc.returncode: rc = proc.returncode break