[lit] Use io.open to compare two files since it supports different encodings while older versions of open do not
llvm-svn: 329020
This commit is contained in:
parent
a82c25a434
commit
b50baa1c4b
|
@ -388,7 +388,7 @@ def executeBuiltinDiff(cmd, cmd_shenv):
|
||||||
def compareTwoFiles(filepaths):
|
def compareTwoFiles(filepaths):
|
||||||
filelines = []
|
filelines = []
|
||||||
for file in filepaths:
|
for file in filepaths:
|
||||||
with open(file, 'r') as f:
|
with io.open(file, 'r') as f:
|
||||||
filelines.append(f.readlines())
|
filelines.append(f.readlines())
|
||||||
|
|
||||||
exitCode = 0
|
exitCode = 0
|
||||||
|
|
Loading…
Reference in New Issue