diff options
author | Ben Smith <binji@chromium.org> | 2016-08-30 16:42:42 -0700 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2016-09-01 11:58:17 -0700 |
commit | a0a53eace2efd3e07cb584cd6f360058bb4dce17 (patch) | |
tree | 75b9068c8376641a7f996bfa8654eea53259af36 /test/utils.py | |
parent | e771a3b9d3ac4ea19ff3be45983276b844213d4e (diff) | |
download | wabt-a0a53eace2efd3e07cb584cd6f360058bb4dce17.tar.gz wabt-a0a53eace2efd3e07cb584cd6f360058bb4dce17.tar.bz2 wabt-a0a53eace2efd3e07cb584cd6f360058bb4dce17.zip |
python3 support
Diffstat (limited to 'test/utils.py')
-rw-r--r-- | test/utils.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/utils.py b/test/utils.py index a9c8dce4..97d915ce 100644 --- a/test/utils.py +++ b/test/utils.py @@ -15,6 +15,7 @@ # limitations under the License. # +from __future__ import print_function import contextlib import os import shutil @@ -47,7 +48,7 @@ class Executable(object): cmd = [self.exe] + self.before_args + list(args) + self.after_args cmd_str = ' '.join(cmd) if self.verbose: - print cmd_str + print(cmd_str) err_cmd_str = cmd_str.replace('.exe', '') if not self.error_cmdline: @@ -61,6 +62,8 @@ class Executable(object): stderr=subprocess.PIPE, **kwargs) stdout, stderr = process.communicate() + stdout = stdout.decode('ascii') + stderr = stderr.decode('ascii') if self.clean_stdout: stdout = self.clean_stdout(stdout) if self.clean_stderr: @@ -92,7 +95,7 @@ class Executable(object): self.after_args.append(arg) def AppendOptionalArgs(self, option_dict): - for option, value in option_dict.iteritems(): + for option, value in option_dict.items(): if value: self.AppendArg(option) |