llvm.org GIT mirror llvm / 4ea03c9
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 NAKAMURA Takumi 2 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
11
22 import sys
33
4 sys.stdout.write(b"a line with bad encoding: \xc2.")
4 getattr(sys.stdout, "buffer", sys.stdout).write(b"a line with bad encoding: \xc2.")
55 sys.stdout.flush()