[PATCH] D56258: python compat - encode/decode
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 3 06:05:35 PST 2019
serge-sans-paille updated this revision to Diff 180049.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56258/new/
https://reviews.llvm.org/D56258
Files:
tools/opt-viewer/opt-viewer.py
Index: tools/opt-viewer/opt-viewer.py
===================================================================
--- tools/opt-viewer/opt-viewer.py
+++ 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.180049.patch
Type: text/x-patch
Size: 575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190103/8e0f4618/attachment.bin>
More information about the llvm-commits
mailing list