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.py17
1 files changed, 4 insertions, 13 deletions
diff --git a/engine/SCons/Action.py b/engine/SCons/Action.py
index 7a4203c..6c34a43 100644
--- a/engine/SCons/Action.py
+++ b/engine/SCons/Action.py
@@ -76,7 +76,7 @@ way for wrapping up the functions.
"""
-# Copyright (c) 2001 - 2015 The SCons Foundation
+# Copyright (c) 2001 - 2016 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,7 +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 rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog"
+__revision__ = "src/engine/SCons/Action.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog"
import dis
import os
@@ -235,11 +235,7 @@ def _code_contents(code):
# The code contents depends on the number of local variables
# but not their actual names.
contents.append("%s,%s" % (code.co_argcount, len(code.co_varnames)))
- try:
- contents.append(",%s,%s" % (len(code.co_cellvars), len(code.co_freevars)))
- except AttributeError:
- # Older versions of Python do not support closures.
- contents.append(",0,0")
+ contents.append(",%s,%s" % (len(code.co_cellvars), len(code.co_freevars)))
# The code contents depends on any constants accessed by the
# function. Note that we have to call _object_contents on each
@@ -276,11 +272,7 @@ def _function_contents(func):
contents.append(',()')
# The function contents depends on the closure captured cell values.
- try:
- closure = func.func_closure or []
- except AttributeError:
- # Older versions of Python do not support closures.
- closure = []
+ closure = func.func_closure or []
#xxx = [_object_contents(x.cell_contents) for x in closure]
try:
@@ -946,7 +938,6 @@ class LazyAction(CommandGeneratorAction, CommandAction):
def __init__(self, var, kw):
if SCons.Debug.track_instances: logInstanceCreation(self, 'Action.LazyAction')
- #FUTURE CommandAction.__init__(self, '${'+var+'}', **kw)
CommandAction.__init__(self, '${'+var+'}', **kw)
self.var = SCons.Util.to_String(var)
self.gen_kw = kw