forked from OSchip/llvm-project
[lit] Attempt to fix builtin diff code for Python 2
llvm-svn: 329024
This commit is contained in:
parent
24a77396a9
commit
30b215e8f7
|
@ -12,6 +12,7 @@ import shutil
|
|||
import tempfile
|
||||
import threading
|
||||
|
||||
import io
|
||||
try:
|
||||
from StringIO import StringIO
|
||||
except ImportError:
|
||||
|
@ -388,6 +389,8 @@ def executeBuiltinDiff(cmd, cmd_shenv):
|
|||
def compareTwoFiles(filepaths):
|
||||
filelines = []
|
||||
for file in filepaths:
|
||||
compare_bytes = False
|
||||
encoding = None
|
||||
try:
|
||||
with open(file, 'r') as f:
|
||||
filelines.append(f.readlines())
|
||||
|
|
Loading…
Reference in New Issue