summaryrefslogtreecommitdiff
path: root/test/utils.py
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2021-10-19 16:13:17 -0700
committerGitHub <noreply@github.com>2021-10-19 16:13:17 -0700
commit6490253773d77a68d47b33d25b5b875e85007dde (patch)
tree30323213c38e392d99aa5c17869f2ac46f6c3d08 /test/utils.py
parent5d2a919ce1fea41a626c5cc8fc440879756fde9c (diff)
downloadwabt-6490253773d77a68d47b33d25b5b875e85007dde.tar.gz
wabt-6490253773d77a68d47b33d25b5b875e85007dde.tar.bz2
wabt-6490253773d77a68d47b33d25b5b875e85007dde.zip
Simplification followup from #1735. NFC (#1745)
Diffstat (limited to 'test/utils.py')
-rw-r--r--test/utils.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/utils.py b/test/utils.py
index 5e52147b..791d0d10 100644
--- a/test/utils.py
+++ b/test/utils.py
@@ -65,12 +65,11 @@ class Executable(object):
stderr = ''
error = None
try:
- process = subprocess.run(cmd, check=False, stdout=self.stdout_handle,
+ process = subprocess.run(cmd, check=False, text=True,
+ stdout=self.stdout_handle,
stderr=self.stderr_handle, **kwargs)
- if process.stdout:
- stdout = process.stdout.decode('utf-8', 'ignore')
- if process.stdout:
- stderr = process.stderr.decode('utf-8', 'ignore')
+ stdout = process.stdout
+ stderr = process.stderr
if process.returncode < 0:
# Terminated by signal
signame = SIGNAMES.get(-process.returncode, '<unknown>')