Skip to content

Commit 4ea03c9

Browse files
committed
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 <module> sys.stdout.write(b"a line with bad encoding: \xc2.") sys.stdout.write doesn't accept bytes but sys.stdout.buffer.write accepts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309473 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 1ab1e79 commit 4ea03c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
import sys
44

5-
sys.stdout.write(b"a line with bad encoding: \xc2.")
5+
getattr(sys.stdout, "buffer", sys.stdout).write(b"a line with bad encoding: \xc2.")
66
sys.stdout.flush()

0 commit comments

Comments
 (0)