summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Taskmaster.py
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-04-24 05:51:13 (GMT)
committerGreg Noel <GregNoel@tigris.org>2010-04-24 05:51:13 (GMT)
commit7e116b31182749950856c622ca7932031f8be19c (patch)
treea4b9f900e52561a91e0c4509dc6c692492996b7f /src/engine/SCons/Taskmaster.py
parent591b78f0f314f11192fdf13d3baa66f81b160e44 (diff)
downloadSCons-7e116b31182749950856c622ca7932031f8be19c.zip
SCons-7e116b31182749950856c622ca7932031f8be19c.tar.gz
SCons-7e116b31182749950856c622ca7932031f8be19c.tar.bz2
http://scons.tigris.org/issues/show_bug.cgi?id=2345
Comb out all code that supported earlier versions of Python. Most such code is in snippets of only a few lines and can be identified by having a Python version string in it. Such snippets add up; this combing pass probably got rid of over 500 lines of code.
Diffstat (limited to 'src/engine/SCons/Taskmaster.py')
-rw-r--r--src/engine/SCons/Taskmaster.py27
1 files changed, 6 insertions, 21 deletions
diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py
index e55757a..0531f90 100644
--- a/src/engine/SCons/Taskmaster.py
+++ b/src/engine/SCons/Taskmaster.py
@@ -19,8 +19,6 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS
__doc__ = """
Generic Taskmaster module for the SCons build engine.
@@ -952,16 +950,7 @@ class Taskmaster:
self.trace_node(n)))
try:
while True:
- try:
- node = to_visit.pop()
- except AttributeError:
- # Python 1.5.2
- if len(to_visit):
- node = to_visit[0]
- to_visit.remove(node)
- else:
- break
-
+ node = to_visit.pop()
node_func(node)
# Prune recursion by flushing the waiting children
@@ -981,7 +970,7 @@ class Taskmaster:
pass
# We have the stick back the pending_children list into the
- # task master because the python 1.5.2 compatibility does not
+ # taskmaster because the python 1.5.2 compatibility does not
# allow us to use in-place updates
self.pending_children = pending_children
@@ -998,16 +987,12 @@ class Taskmaster:
if not self.pending_children:
return
- # TODO(1.5)
- #nclist = [ (n, find_cycle([n], set())) for n in self.pending_children ]
nclist = [(n, find_cycle([n], set())) for n in self.pending_children]
- # TODO(1.5)
- #genuine_cycles = [
- # node for node, cycle in nclist
- # if cycle or node.get_state() != NODE_EXECUTED
- #]
- genuine_cycles = [t for t in nclist if t[1] or t[0].get_state() != NODE_EXECUTED]
+ genuine_cycles = [
+ node for node,cycle in nclist
+ if cycle or node.get_state() != NODE_EXECUTED
+ ]
if not genuine_cycles:
# All of the "cycles" found were single nodes in EXECUTED state,
# which is to say, they really weren't cycles. Just return.