diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-04-10 09:11:22 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-04-10 09:11:22 +0000 |
commit | 4088b8572629223e29ec3e439dcc9888c9c72a54 (patch) | |
tree | 4307fa810ee86079ab7d264210f5673554d47e5f | |
parent | 1caa4c4bfc6222f769c83cd6660a0e8cf86d8e9e (diff) | |
download | portage-4088b8572629223e29ec3e439dcc9888c9c72a54.tar.gz portage-4088b8572629223e29ec3e439dcc9888c9c72a54.tar.bz2 portage-4088b8572629223e29ec3e439dcc9888c9c72a54.zip |
Iterate over a copy of the digraph nodes so that removal can't break
the iterator.
svn path=/main/trunk/; revision=9799
-rw-r--r-- | pym/_emerge/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 6eae62d11..f99ba7bcd 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -7132,7 +7132,7 @@ def action_build(settings, trees, mtimedb, return retval if "--buildpkgonly" in myopts: graph_copy = mydepgraph.digraph.clone() - for node in graph_copy.order: + for node in list(graph_copy.order): if not isinstance(node, Package): graph_copy.remove(node) if not graph_copy.hasallzeros(ignore_priority=DepPriority.MEDIUM): @@ -7142,7 +7142,7 @@ def action_build(settings, trees, mtimedb, else: if "--buildpkgonly" in myopts: graph_copy = mydepgraph.digraph.clone() - for node in graph_copy.order: + for node in list(graph_copy.order): if not isinstance(node, Package): graph_copy.remove(node) if not graph_copy.hasallzeros(ignore_priority=DepPriority.MEDIUM): |