From 15b5c8b2069a025566f13c4a81339c6f687ee312 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sat, 29 Jul 2017 02:52:56 +0000 Subject: lit::shtest-format.py: Make write-bad-encoding.py py3-aware. Traceback (most recent call last): File "llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py", line 5, in sys.stdout.write(b"a line with bad encoding: \xc2.") sys.stdout.write doesn't accept bytes but sys.stdout.buffer.write accepts. llvm-svn: 309473 --- .../lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/utils/lit/tests') diff --git a/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py b/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py index 32ff2d81805..a5a2bc9da8a 100644 --- a/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py +++ b/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py @@ -2,5 +2,5 @@ import sys -sys.stdout.write(b"a line with bad encoding: \xc2.") +getattr(sys.stdout, "buffer", sys.stdout).write(b"a line with bad encoding: \xc2.") sys.stdout.flush() -- cgit v1.2.3