From: Zac Medico Date: Tue, 17 Jul 2007 21:41:53 +0000 (-0000) Subject: Iterate over a list in order to avoid breaking the iterator when an atom is removed. X-Git-Tag: v2.2_pre1~995 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ebd42fc6da1aca53badec4b34f118d7f106f3835;p=portage.git Iterate over a list in order to avoid breaking the iterator when an atom is removed. svn path=/main/trunk/; revision=7303 --- diff --git a/pym/portage/sets/__init__.py b/pym/portage/sets/__init__.py index 163e84eaf..29dc60c07 100644 --- a/pym/portage/sets/__init__.py +++ b/pym/portage/sets/__init__.py @@ -135,7 +135,7 @@ class EditablePackageSet(PackageSet): self.write() def removePackageAtoms(self, cp): - for a in self.getAtoms(): + for a in list(self.getAtoms()): if dep_getkey(a) == cp: self.remove(a) self.write()