[PATCH] D34464: lit: Make sure testnames are unicode strings
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 21 15:04:58 PDT 2017
MatzeB added inline comments.
================
Comment at: utils/lit/lit/Test.py:232
+ # as str objects when they don't decode cleanly.
+ if sys.version_info < (3,0,0):
+ testpath = testpath.decode(sys.getfilesystemencoding(),
----------------
chapuni wrote:
> Could you make it work without checking version?
> (I haven't tested yet)
No I could not. It seems on python2 you get `str` objects back from listdir() sometimes, while on python3 you always get a (unicode) string back. Calling decode on a string in python3 is not allowed.
Repository:
rL LLVM
https://reviews.llvm.org/D34464
More information about the llvm-commits
mailing list