Remove unnecessary creation of lists when iterating over digraphs for
authorZac Medico <zmedico@gentoo.org>
Thu, 5 Mar 2009 01:40:55 +0000 (01:40 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 5 Mar 2009 01:40:55 +0000 (01:40 -0000)
--buildpkgonly hasallzeros check.

svn path=/main/trunk/; revision=12750

pym/_emerge/__init__.py

index 4c922574661a63629e612658cc2ef99b137aafa4..8abe080f979922a72f2e5cc49540da74eb325b13 100644 (file)
@@ -14510,7 +14510,7 @@ def action_build(settings, trees, mtimedb,
                        if "--buildpkgonly" in myopts:
                                graph_copy = mydepgraph.digraph.clone()
                                removed_nodes = set()
-                               for node in list(graph_copy.order):
+                               for node in graph_copy:
                                        if not isinstance(node, Package) or \
                                                node.operation == "nomerge":
                                                removed_nodes.add(node)
@@ -14524,7 +14524,7 @@ def action_build(settings, trees, mtimedb,
                if "--buildpkgonly" in myopts:
                        graph_copy = mydepgraph.digraph.clone()
                        removed_nodes = set()
-                       for node in list(graph_copy.order):
+                       for node in graph_copy:
                                if not isinstance(node, Package) or \
                                        node.operation == "nomerge":
                                        removed_nodes.add(node)