summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-17 21:41:53 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-17 21:41:53 +0000
commitebd42fc6da1aca53badec4b34f118d7f106f3835 (patch)
tree08fc9cbd403d0773a7a13a22fd9b25f311c9731b
parent085722d4efbf9db30b51b2e38460980bfe4a3e01 (diff)
downloadportage-ebd42fc6da1aca53badec4b34f118d7f106f3835.tar.gz
portage-ebd42fc6da1aca53badec4b34f118d7f106f3835.tar.bz2
portage-ebd42fc6da1aca53badec4b34f118d7f106f3835.zip
Iterate over a list in order to avoid breaking the iterator when an atom is removed.
svn path=/main/trunk/; revision=7303
-rw-r--r--pym/portage/sets/__init__.py2
1 files changed, 1 insertions, 1 deletions
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()