summaryrefslogtreecommitdiff
path: root/engine/SCons/Action.py
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Action.py')
-rw-r--r--engine/SCons/Action.py38
1 files changed, 18 insertions, 20 deletions
diff --git a/engine/SCons/Action.py b/engine/SCons/Action.py
index aec164f..ca3eddf 100644
--- a/engine/SCons/Action.py
+++ b/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)