1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

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.

llvm-svn: 309473
This commit is contained in:
NAKAMURA Takumi 2017-07-29 02:52:56 +00:00
parent fa41204583
commit d0e345d44e

View File

@ -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()