[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:
Aaron Smith 2018-04-02 21:44:51 +00:00
parent a82c25a434
commit b50baa1c4b
1 changed files with 1 additions and 1 deletions

View File

@ -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