[PATCH] D43501: [lit] Implement 'cat' command for internal shell
Chamal De Silva via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 28 01:46:19 PDT 2018
chamalsl updated this revision to Diff 140050.
chamalsl added a comment.
Modified cat.py file to work with python3 and python2.
https://reviews.llvm.org/D43501
Files:
utils/lit/lit/builtin_commands/cat.py
Index: utils/lit/lit/builtin_commands/cat.py
===================================================================
--- utils/lit/lit/builtin_commands/cat.py
+++ utils/lit/lit/builtin_commands/cat.py
@@ -48,7 +48,7 @@
contents = fileToCat.read()
if show_nonprinting:
contents = convertToCaretAndMNotation(contents)
- sys.stdout.write(contents)
+ sys.stdout.write(contents.decode("utf-8"))
sys.stdout.flush()
fileToCat.close()
except IOError as error:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43501.140050.patch
Type: text/x-patch
Size: 548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180328/017fb49c/attachment.bin>
More information about the llvm-commits
mailing list