Remove unnecessary creation of lists when iterating over digraphs for
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:37:58 +0000 (06:37 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:37:58 +0000 (06:37 -0000)
--buildpkgonly hasallzeros check. (trunk r12750)

svn path=/main/branches/2.1.6/; revision=12998

pym/_emerge/__init__.py

index f3209c34ee37c864b244597ed5ef818f3c01bd28..23a051d5b4da2a126c3fc063a9de55f52ea3c69f 100644 (file)
@@ -14156,7 +14156,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)
@@ -14170,7 +14170,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)