From d12e3bd9a7203c412fb878b02d9916bbbc695e49 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Fri, 15 Dec 2017 11:21:56 -0500 Subject: [PATCH 1/2] Remove unnecessary print out. Also remove trailing blank line. --- build_tools/SCons/cxxtest.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build_tools/SCons/cxxtest.py b/build_tools/SCons/cxxtest.py index 450b317..02a3df1 100644 --- a/build_tools/SCons/cxxtest.py +++ b/build_tools/SCons/cxxtest.py @@ -280,9 +280,6 @@ def generate(env, **kwargs): python, docs and other subdirectories. ... and all others that Program() accepts, like CPPPATH etc. """ - - print "Loading CxxTest tool..." - # # Expected behaviour: keyword arguments override environment variables; # environment variables override default settings. @@ -397,4 +394,3 @@ def CxxTest(env, target, source = None, **kwargs): def exists(env): return os.path.exists(env['CXXTEST']) - From ee39703aee580c7ac93475bb19ae89d8a2e03ec8 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Fri, 15 Dec 2017 11:26:35 -0500 Subject: [PATCH 2/2] Make SCons/cxxtest.py compatible with Python 3. --- build_tools/SCons/cxxtest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_tools/SCons/cxxtest.py b/build_tools/SCons/cxxtest.py index 02a3df1..dc79826 100644 --- a/build_tools/SCons/cxxtest.py +++ b/build_tools/SCons/cxxtest.py @@ -92,7 +92,7 @@ def multiget(dictlist, key, default = None): dictionaries, the default is returned. """ for dict in dictlist: - if dict.has_key(key): + if key in dict: return dict[key] else: return default @@ -304,11 +304,11 @@ def generate(env, **kwargs): env.SetDefault( CXXTEST_CXXTESTGEN_SCRIPT_NAME = 'cxxtestgen' ) #Here's where keyword arguments are applied - apply(env.Replace, (), kwargs) + env.Replace(**kwargs) #If the user specified the path to CXXTEST, make sure it is correct #otherwise, search for and set the default toolpath. - if (not kwargs.has_key('CXXTEST') or not isValidScriptPath(kwargs['CXXTEST']) ): + if 'CXXTEST' not in kwargs or not isValidScriptPath(kwargs['CXXTEST']): env["CXXTEST"] = findCxxTestGen(env) # find and add the CxxTest headers to the path.