[PATCH] D56258: python compat - encode/decode
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 3 06:44:24 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL350320: Python compat - decode/encode string (authored by serge_sans_paille, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D56258?vs=180049&id=180067#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56258/new/
https://reviews.llvm.org/D56258
Files:
llvm/trunk/tools/opt-viewer/opt-viewer.py
Index: llvm/trunk/tools/opt-viewer/opt-viewer.py
===================================================================
--- llvm/trunk/tools/opt-viewer/opt-viewer.py
+++ llvm/trunk/tools/opt-viewer/opt-viewer.py
@@ -72,7 +72,10 @@
file_text = stream.read()
if self.no_highlight:
- html_highlighted = file_text.decode('utf-8')
+ if sys.version_info.major >= 3:
+ html_highlighted = file_text
+ else:
+ html_highlighted = file_text.decode('utf-8')
else:
html_highlighted = highlight(
file_text,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56258.180067.patch
Type: text/x-patch
Size: 608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190103/15585298/attachment.bin>
More information about the llvm-commits
mailing list