diff options
author | Dirk Baechle <dl9obn@darc.de> | 2015-12-10 17:01:37 (GMT) |
---|---|---|
committer | Dirk Baechle <dl9obn@darc.de> | 2015-12-10 17:01:37 (GMT) |
commit | e7de9d22c9503cf29e5d8b5e7813f060d59a00e5 (patch) | |
tree | d88708df964dc576ad2a85eedd9ef08cd29a0240 /src/engine/SCons/SConf.py | |
parent | 78fb1b6ef0e42954feb668efb84de59173221374 (diff) | |
download | SCons-e7de9d22c9503cf29e5d8b5e7813f060d59a00e5.zip SCons-e7de9d22c9503cf29e5d8b5e7813f060d59a00e5.tar.gz SCons-e7de9d22c9503cf29e5d8b5e7813f060d59a00e5.tar.bz2 |
removed several pre-2.7 methods and imports, including some basic refactorings
Diffstat (limited to 'src/engine/SCons/SConf.py')
-rw-r--r-- | src/engine/SCons/SConf.py | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/engine/SCons/SConf.py b/src/engine/SCons/SConf.py index 987b8ea..286f230 100644 --- a/src/engine/SCons/SConf.py +++ b/src/engine/SCons/SConf.py @@ -254,14 +254,7 @@ class SConfBuildTask(SCons.Taskmaster.AlwaysTask): else: self.display('Caught exception while building "%s":\n' % self.targets[0]) - try: - excepthook = sys.excepthook - except AttributeError: - # Earlier versions of Python don't have sys.excepthook... - def excepthook(type, value, tb): - traceback.print_tb(tb) - print type, value - excepthook(*self.exc_info()) + sys.excepthook(*self.exc_info()) return SCons.Taskmaster.Task.failed(self) def collect_node_states(self): @@ -355,8 +348,6 @@ class SConfBuildTask(SCons.Taskmaster.AlwaysTask): raise SCons.Errors.ExplicitExit(self.targets[0],exc_value.code) except Exception, e: for t in self.targets: - #binfo = t.get_binfo() - #binfo.__class__ = SConfBuildInfo binfo = SConfBuildInfo() binfo.merge(t.get_binfo()) binfo.set_build_result(1, s.getvalue()) @@ -375,8 +366,6 @@ class SConfBuildTask(SCons.Taskmaster.AlwaysTask): raise e else: for t in self.targets: - #binfo = t.get_binfo() - #binfo.__class__ = SConfBuildInfo binfo = SConfBuildInfo() binfo.merge(t.get_binfo()) binfo.set_build_result(0, s.getvalue()) @@ -399,16 +388,16 @@ class SConfBase(object): tests, be sure to call the Finish() method, which returns the modified environment. Some words about caching: In most cases, it is not necessary to cache - Test results explicitely. Instead, we use the scons dependency checking + Test results explicitly. Instead, we use the scons dependency checking mechanism. For example, if one wants to compile a test program (SConf.TryLink), the compiler is only called, if the program dependencies have changed. However, if the program could not be compiled in a former - SConf run, we need to explicitely cache this error. + SConf run, we need to explicitly cache this error. """ def __init__(self, env, custom_tests = {}, conf_dir='$CONFIGUREDIR', log_file='$CONFIGURELOG', config_h = None, _depth = 0): - """Constructor. Pass additional tests in the custom_tests-dictinary, + """Constructor. Pass additional tests in the custom_tests-dictionary, e.g. custom_tests={'CheckPrivate':MyPrivateTest}, where MyPrivateTest defines a custom test. Note also the conf_dir and log_file arguments (you may want to |