[PATCH] D43165: [lit] Fix problem in how Python versions open files with different encodings
Aaron Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 2 15:40:57 PDT 2018
asmith added inline comments.
================
Comment at: llvm/trunk/utils/lit/lit/TestRunner.py:434
+ for file in filepaths:
+ with open(file, 'r', encoding=encoding) as f:
filelines.append(f.readlines())
----------------
rnk wrote:
> I'm getting this Python error now:
> ```
> File "C:/src/llvm-project/llvm\utils\lit\lit\TestRunner.py", line 545, in executeBuiltinDiff
> exitCode = compareTwoFiles(filepaths)
> File "C:/src/llvm-project/llvm\utils\lit\lit\TestRunner.py", line 408, in compareTwoFiles
> return compareTwoTextFiles(filepaths, encoding)
> File "C:/src/llvm-project/llvm\utils\lit\lit\TestRunner.py", line 434, in compareTwoTextFiles
> with open(file, 'r', encoding=encoding) as f:
> TypeError: 'encoding' is an invalid keyword argument for this function
> ```
>
> This doesn't seem Py2/3 compatible. =/
That's a merge issue on my part that I just fixed.
Repository:
rL LLVM
https://reviews.llvm.org/D43165
More information about the llvm-commits
mailing list