summaryrefslogtreecommitdiff
path: root/QMTest
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-06-25 10:54:46 -0700
committerWilliam Deegan <bill@baddogconsulting.com>2017-06-25 10:54:46 -0700
commit1babbb081a03fb20c63c0b2459a6e1ec2ecb848e (patch)
tree71f8492f7a7e66b75a617fc08c160b4a26a7bd52 /QMTest
parent4c9156f824a9a7714b40f7a81c9764a9b718c83f (diff)
downloadscons-1babbb081a03fb20c63c0b2459a6e1ec2ecb848e.tar.gz
py2/3 fix expected signatures for python actions (functions,classes). Unfortunately it looks like they may vary by platform and by python release, at least on win py3.5 vs py3.6. May be a good idea to take a second look at these signatures and see if there is a way to stabilize by python version. Added note to CHANGES
Diffstat (limited to 'QMTest')
-rw-r--r--QMTest/TestCmd.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py
index e4c69a6e..61da8b93 100644
--- a/QMTest/TestCmd.py
+++ b/QMTest/TestCmd.py
@@ -307,7 +307,8 @@ import traceback
import types
-PY3 = sys.version_info[0] == 3
+IS_PY3 = sys.version_info[0] == 3
+IS_WINDOWS = sys.platform == 'win32'
class null(object):
@@ -1245,7 +1246,7 @@ class TestCmd(object):
file = self.canonicalize(file)
if mode[0] != 'r':
raise ValueError("mode must begin with 'r'")
- if PY3 and 'b' not in mode:
+ if IS_PY3 and 'b' not in mode:
return open(file, mode, newline=newline).read()
else:
return open(file, mode).read()