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>
pull/4799/head
Simon McVittie 6 years ago committed by Jussi Pakkanen
parent 57424e9403
commit 65192af2ff
  1. 7
      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__':

Loading…
Cancel
Save