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 9608a2891d
commit 15b5c8b206
1 changed files with 1 additions and 1 deletions

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