diff options
Diffstat (limited to 'engine/SCons/Executor.py')
-rw-r--r-- | engine/SCons/Executor.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/engine/SCons/Executor.py b/engine/SCons/Executor.py index cc3813c..c6ffe81 100644 --- a/engine/SCons/Executor.py +++ b/engine/SCons/Executor.py @@ -28,7 +28,7 @@ Nodes. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from __future__ import print_function -__revision__ = "src/engine/SCons/Executor.py a56bbd8c09fb219ab8a9673330ffcd55279219d0 2019-03-26 23:16:31 bdeegan" +__revision__ = "src/engine/SCons/Executor.py e724ae812eb96f4858a132f5b8c769724744faf6 2019-07-21 00:04:47 bdeegan" import collections @@ -36,15 +36,16 @@ import SCons.Debug from SCons.Debug import logInstanceCreation import SCons.Errors import SCons.Memoize +import SCons.Util from SCons.compat import with_metaclass, NoSlotsPyPy class Batch(object): """Remembers exact association between targets and sources of executor.""" - + __slots__ = ('targets', 'sources') - + def __init__(self, targets=[], sources=[]): self.targets = targets self.sources = sources @@ -71,7 +72,7 @@ class TSList(collections.UserList): return nl[i] def __getslice__(self, i, j): nl = self.func() - i = max(i, 0); j = max(j, 0) + i, j = max(i, 0), max(j, 0) return nl[i:j] def __str__(self): nl = self.func() @@ -127,13 +128,13 @@ def execute_action_list(obj, target, kw): status = act(*args, **kw) if isinstance(status, SCons.Errors.BuildError): status.executor = obj - raise status + raise status # TODO pylint E0702: raising int not allowed elif status: msg = "Error %s" % status raise SCons.Errors.BuildError( - errstr=msg, + errstr=msg, node=obj.batches[0].targets, - executor=obj, + executor=obj, action=act) return status @@ -572,7 +573,6 @@ def AddBatchExecutor(key, executor): nullenv = None -import SCons.Util class NullEnvironment(SCons.Util.Null): import SCons.CacheDir _CacheDir_path = None @@ -597,7 +597,7 @@ class Null(object, with_metaclass(NoSlotsPyPy)): disassociate Builders from Nodes entirely, so we're not going to worry about unit tests for this--at least for now. """ - + __slots__ = ('pre_actions', 'post_actions', 'env', @@ -613,9 +613,10 @@ class Null(object, with_metaclass(NoSlotsPyPy)): 'action_list', '_do_execute', '_execute_str') - + def __init__(self, *args, **kw): - if SCons.Debug.track_instances: logInstanceCreation(self, 'Executor.Null') + if SCons.Debug.track_instances: + logInstanceCreation(self, 'Executor.Null') self.batches = [Batch(kw['targets'][:], [])] def get_build_env(self): return get_NullEnvironment() @@ -649,7 +650,7 @@ class Null(object, with_metaclass(NoSlotsPyPy)): """Morph this Null executor to a real Executor object.""" batches = self.batches self.__class__ = Executor - self.__init__([]) + self.__init__([]) self.batches = batches # The following methods require morphing this Null Executor to a |