From f7e5d2b46b03cc4bc09c38f7e0873378bb9c3b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 21 Jun 2015 07:55:15 +0200 Subject: Imported Upstream version 2.3.5 --- src/engine/SCons/Action.py | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'src/engine/SCons/Action.py') diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py index aec164f..ca3eddf 100644 --- a/src/engine/SCons/Action.py +++ b/src/engine/SCons/Action.py @@ -76,7 +76,7 @@ way for wrapping up the functions. """ -# Copyright (c) 2001 - 2014 The SCons Foundation +# Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -97,9 +97,7 @@ way for wrapping up the functions. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Action.py 2014/09/27 12:51:43 garyo" - -import SCons.compat +__revision__ = "src/engine/SCons/Action.py pchdll:3325:cd517fae59a4 2015/06/18 06:53:27 bdbaddog" import dis import os @@ -112,7 +110,6 @@ import subprocess import SCons.Debug from SCons.Debug import logInstanceCreation import SCons.Errors -import SCons.Executor import SCons.Util import SCons.Subst @@ -357,21 +354,6 @@ def _do_create_action(act, kw): if isinstance(act, ActionBase): return act - if is_List(act): - return CommandAction(act, **kw) - - if callable(act): - try: - gen = kw['generator'] - del kw['generator'] - except KeyError: - gen = 0 - if gen: - action_type = CommandGeneratorAction - else: - action_type = FunctionAction - return action_type(act, kw) - if is_String(act): var=SCons.Util.get_environment_var(act) if var: @@ -388,6 +370,22 @@ def _do_create_action(act, kw): # The list of string commands may include a LazyAction, so we # reprocess them via _do_create_list_action. return _do_create_list_action(commands, kw) + + if is_List(act): + return CommandAction(act, **kw) + + if callable(act): + try: + gen = kw['generator'] + del kw['generator'] + except KeyError: + gen = 0 + if gen: + action_type = CommandGeneratorAction + else: + action_type = FunctionAction + return action_type(act, kw) + # Catch a common error case with a nice message: if isinstance(act, int) or isinstance(act, float): raise TypeError("Don't know how to create an Action from a number (%s)"%act) -- cgit v1.2.3