diff options
author | William Deegan <bill@baddogconsulting.com> | 2016-05-13 23:30:20 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2016-05-13 23:30:20 (GMT) |
commit | 9dc0f8feb825d50da88009c84fc274fb489d3a19 (patch) | |
tree | 7c2dbfcd86dff189621e5f8f1e632436d7c113af | |
parent | b8ba51c52564ddf72a4f3dc229c35e081937aafa (diff) | |
download | SCons-9dc0f8feb825d50da88009c84fc274fb489d3a19.zip SCons-9dc0f8feb825d50da88009c84fc274fb489d3a19.tar.gz SCons-9dc0f8feb825d50da88009c84fc274fb489d3a19.tar.bz2 |
fixes for print()'s for win32
-rw-r--r-- | QMTest/TestSConsMSVS.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Action.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Taskmaster.py | 6 | ||||
-rw-r--r-- | test/MSVC/query_vcbat.py | 2 | ||||
-rw-r--r-- | test/MSVS/vs-8.0-exec.py | 2 |
5 files changed, 11 insertions, 7 deletions
diff --git a/QMTest/TestSConsMSVS.py b/QMTest/TestSConsMSVS.py index 7459af0..39dbb5e 100644 --- a/QMTest/TestSConsMSVS.py +++ b/QMTest/TestSConsMSVS.py @@ -1037,8 +1037,8 @@ class TestSConsMSVS(TestSCons): input = """\ import SCons import SCons.Tool.MSCommon -print "self.scons_version =", repr(SCons.__%s__) -print "self._msvs_versions =", str(SCons.Tool.MSCommon.query_versions()) +print("self.scons_version =", repr(SCons.__%s__)) +print("self._msvs_versions =", str(SCons.Tool.MSCommon.query_versions())) """ % 'version' self.run(arguments = '-n -q -Q -f -', stdin = input) diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py index a4e75f3..7e1f8f1 100644 --- a/src/engine/SCons/Action.py +++ b/src/engine/SCons/Action.py @@ -233,8 +233,8 @@ def _code_contents(code): # The code contents depends on the number of local variables # but not their actual names. - contents.append("{}, {}".format(code.co_argcount, len(code.co_varnames))) - contents.append(", {}, {}".format(len(code.co_cellvars), len(code.co_freevars))) + contents.append(b"{}, {}".format(code.co_argcount, len(code.co_varnames))) + contents.append(b", {}, {}".format(len(code.co_cellvars), len(code.co_freevars))) # The code contents depends on any constants accessed by the # function. Note that we have to call _object_contents on each diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py index 7260071..ddafeb9 100644 --- a/src/engine/SCons/Taskmaster.py +++ b/src/engine/SCons/Taskmaster.py @@ -539,7 +539,11 @@ class Task(object): except ValueError: exc_type, exc_value = exc exc_traceback = None - raise exc_type, exc_value, exc_traceback + # raise exc_type, exc_value, exc_traceback + raise exc_type(exc_value).with_traceback(exc_traceback) + + # raise e.__class__, e.__class__(e), sys.exc_info()[2] + class AlwaysTask(Task): def needs_execute(self): diff --git a/test/MSVC/query_vcbat.py b/test/MSVC/query_vcbat.py index 328345d..428fe56 100644 --- a/test/MSVC/query_vcbat.py +++ b/test/MSVC/query_vcbat.py @@ -49,7 +49,7 @@ DefaultEnvironment(tools = []) # print k, v #MergeMSVSBatFile(env, 9.0) #print env['ENV']['PATH'] -print query_versions() +print(query_versions()) """) test.run(stderr = None) diff --git a/test/MSVS/vs-8.0-exec.py b/test/MSVS/vs-8.0-exec.py index cff7ca2..96c4c29 100644 --- a/test/MSVS/vs-8.0-exec.py +++ b/test/MSVS/vs-8.0-exec.py @@ -55,7 +55,7 @@ if not msvs_version in test.msvs_versions(): test.run(arguments = '-n -q -Q -f -', stdin = """\ env = Environment(tools = ['msvc'], MSVS_VERSION='%(msvs_version)s') -print "os.environ.update(%%s)" %% repr(env['ENV']) +print("os.environ.update(%%s)" %% repr(env['ENV'])) """ % locals()) exec(test.stdout()) |