diff options
author | qunyanm <unknown> | 2015-10-28 11:28:48 -0700 |
---|---|---|
committer | qunyanm <unknown> | 2015-10-28 11:28:48 -0700 |
commit | de000ae9557791fe4cf182eb29eb25d63e4d800e (patch) | |
tree | 92812c77b937aa7e9572a82170d3cc909fcf233c /Test | |
parent | ab999651fc184fdc6a0cb4b52d1253e6c4b9a060 (diff) |
Check version info before delete white space so that it will work with python
version that is less than 3.
Diffstat (limited to 'Test')
-rw-r--r-- | Test/pydiff.py | 3 |
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: |