diff options
author | Aaron Smith <aaron.smith@microsoft.com> | 2018-04-02 21:44:51 +0000 |
---|---|---|
committer | Aaron Smith <aaron.smith@microsoft.com> | 2018-04-02 21:44:51 +0000 |
commit | fc78d747e49461153cb1de4e98f93dee7a34f07b (patch) | |
tree | c34cace398f87efb86867d742daeced9da2d6964 /utils/lit | |
parent | eee57fe80c7a93422f4dfb48ba26c863a1703774 (diff) |
[lit] Use io.open to compare two files since it supports different encodings while older versions of open do not
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329020 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit')
-rw-r--r-- | utils/lit/lit/TestRunner.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py index ce9e0a0b88b..757d01ac47d 100644 --- a/utils/lit/lit/TestRunner.py +++ b/utils/lit/lit/TestRunner.py @@ -388,7 +388,7 @@ def executeBuiltinDiff(cmd, cmd_shenv): def compareTwoFiles(filepaths): filelines = [] for file in filepaths: - with open(file, 'r') as f: + with io.open(file, 'r') as f: filelines.append(f.readlines()) exitCode = 0 |