summaryrefslogtreecommitdiffstats
path: root/QMTest
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-06-25 17:54:46 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-06-25 17:54:46 (GMT)
commitdac36853a206edc24bbaf2ee8e706f4bd3fd77a8 (patch)
tree71f8492f7a7e66b75a617fc08c160b4a26a7bd52 /QMTest
parentb91c56c52466622defbc4a7a42be31fe19d79120 (diff)
downloadSCons-dac36853a206edc24bbaf2ee8e706f4bd3fd77a8.zip
SCons-dac36853a206edc24bbaf2ee8e706f4bd3fd77a8.tar.gz
SCons-dac36853a206edc24bbaf2ee8e706f4bd3fd77a8.tar.bz2
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 e4c69a6..61da8b9 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()