Remove from list by index, not search.
authorZac Medico <zmedico@gentoo.org>
Fri, 4 Feb 2011 06:28:35 +0000 (22:28 -0800)
committerZac Medico <zmedico@gentoo.org>
Fri, 4 Feb 2011 06:28:35 +0000 (22:28 -0800)
pym/portage/dep/__init__.py

index 68e628b3764564c7516b4c9525a3348d0af5cd81..62e96d29a9aaeaa4ff8489aeee52ed0c634cc5c2 100644 (file)
@@ -2217,7 +2217,7 @@ def check_required_use(required_use, use, iuse_match):
                                        node._satisfied = satisfied
                                        if node._parent._operator not in ("||", "^^"):
                                                offset = node._parent._children.index(node)
-                                               node._parent._children.remove(node)
+                                               node._parent._children.pop(offset)
                                                for i, child in enumerate(node._children):
                                                        node._parent._children.insert(offset + i, child)
                                                        if isinstance(child, _RequiredUseBranch):