summaryrefslogtreecommitdiff
path: root/utils/lit
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2017-07-29 02:52:56 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2017-07-29 02:52:56 +0000
commit4ea03c9bbc26aa8ef30f14b36fd8cdac5d7cbbfd (patch)
tree01e7fe976a9496a5f85502a9bd596b1f3172b0eb /utils/lit
parent1ab1e79a01ede51628ef7cc853dc43a0eb012c10 (diff)
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
Diffstat (limited to 'utils/lit')
-rw-r--r--utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py b/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py
index 32ff2d81805..a5a2bc9da8a 100644
--- a/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py
+++ b/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()