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 tempfile
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
|
import io
|
||||||
try:
|
try:
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -388,6 +389,8 @@ def executeBuiltinDiff(cmd, cmd_shenv):
|
||||||
def compareTwoFiles(filepaths):
|
def compareTwoFiles(filepaths):
|
||||||
filelines = []
|
filelines = []
|
||||||
for file in filepaths:
|
for file in filepaths:
|
||||||
|
compare_bytes = False
|
||||||
|
encoding = None
|
||||||
try:
|
try:
|
||||||
with open(file, 'r') as f:
|
with open(file, 'r') as f:
|
||||||
filelines.append(f.readlines())
|
filelines.append(f.readlines())
|
||||||
|
|
Loading…
Reference in New Issue