From 64dba9134520547180d2e9404f5a7b592e560ae5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 24 Mar 2025 17:38:41 -0400 Subject: Always specify encoding to subprocess run functions --- scripts/serd_bench.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts/serd_bench.py') diff --git a/scripts/serd_bench.py b/scripts/serd_bench.py index d964984f..8e176322 100755 --- a/scripts/serd_bench.py +++ b/scripts/serd_bench.py @@ -192,10 +192,13 @@ def run(progs, n_min, n_max, step): with open(filename(n) + ".out", "w") as out: sys.stderr.write(cmd + "\n") proc = subprocess.Popen( - cmd.split(), stdout=out, stderr=subprocess.PIPE + cmd.split(), + encoding="utf-8", + stdout=out, + stderr=subprocess.PIPE, ) - time, memory = parse_time(proc.communicate()[1].decode()) + time, memory = parse_time(proc.communicate()[1]) rows["time"] += ["%.07f" % time] rows["throughput"] += ["%d" % (n / time)] rows["memory"] += [str(memory)] -- cgit v1.2.1