aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2019-01-11 18:03:15 +0000
committerJussi Pakkanen <jpakkane@gmail.com>2019-01-17 23:09:17 +0200
commit65192af2ff62a032a3f19d065c95e12b83aae709 (patch)
tree4768bcfe077e4b0c2df47c36d2bd965e999f7dec
parent57424e94039a0ba4f95686b23fce3d84775bb1c7 (diff)
downloadmeson-65192af2ff62a032a3f19d065c95e12b83aae709.zip
meson-65192af2ff62a032a3f19d065c95e12b83aae709.tar.gz
meson-65192af2ff62a032a3f19d065c95e12b83aae709.tar.bz2
run_unittests: Use Python 3.5-compatible subprocess invocation
subprocess.run() didn't get the encoding parameter until 3.6. Signed-off-by: Simon McVittie <smcv@collabora.com>
-rwxr-xr-xrun_unittests.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 342ad88..e124614 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -5029,10 +5029,9 @@ class NativeFileTests(BasePlatformTests):
ret = subprocess.run(
["{}"] + extra_args,
stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- encoding='utf-8')
- print(ret.stdout)
- print(ret.stderr, file=sys.stderr)
+ stderr=subprocess.PIPE)
+ print(ret.stdout.decode('utf-8'))
+ print(ret.stderr.decode('utf-8'), file=sys.stderr)
sys.exit(ret.returncode)
if __name__ == '__main__':