[PATCH] D38289: [opt-viewer] Don't Decode HTML bytes for Python 2
Adam Nemet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 10 09:00:43 PDT 2017
anemet accepted this revision.
anemet added a comment.
This revision is now accepted and ready to land.
Sorry about the delay! I remembered something similar also for Python2 so I wanted to doublecheck. Turns out that was https://reviews.llvm.org/D29802 which is unrelated.
LGTM with the additional comment.
@modocache, any opinion about this?
================
Comment at: tools/opt-viewer/opt-viewer.py:69
+ if sys.version_info >= (3, 0):
+ html_highlighted = html_highlighted.decode('utf-8')
----------------
Please add a comment:
On Python 3, pygments.highlight() returns a bytes object, not
a str.
Repository:
rL LLVM
https://reviews.llvm.org/D38289
More information about the llvm-commits
mailing list