summaryrefslogtreecommitdiff
path: root/Test/pydiff.py
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2016-05-30 17:58:02 -0400
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2016-05-30 17:58:02 -0400
commite67c951ad9c5c637e36a6f025ba3d6e3ad945416 (patch)
tree0cfb5c339602e4bdebf4bf97f3f0ccc3923c14d1 /Test/pydiff.py
parent000aa762e1fee4b9bd83ec3d7c8b61fd203e2c9d (diff)
parentdf5c5f547990c1f80ab7594a1f9287ee03a61754 (diff)
Merge commit 'df5c5f5'
Diffstat (limited to 'Test/pydiff.py')
-rw-r--r--Test/pydiff.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Test/pydiff.py b/Test/pydiff.py
index 407fe251..94267960 100644
--- a/Test/pydiff.py
+++ b/Test/pydiff.py
@@ -75,7 +75,8 @@ def preProcess(openFile, stripTrailingCR=False, ignoreAllSpace=False):
# newline characters because this will create a mess when outputting the
# diff. Is this the right behaviour?
deleteChars=' \t'
- translationTable = str.maketrans('','', deleteChars)
+ if sys.version_info.major >= 3:
+ translationTable = str.maketrans('','', deleteChars)
copy = [ ]
for line in original: