summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-01 01:27:21 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-01 01:27:21 +0000
commite3910954d4898fd86c17999d0d4521d5dc2e8c52 (patch)
treea84f87412260b2bde578cb4412b8321914acbd3d
parent365f1798be06dded706488b8c372eed7465ebe8f (diff)
downloadportage-e3910954d4898fd86c17999d0d4521d5dc2e8c52.tar.gz
portage-e3910954d4898fd86c17999d0d4521d5dc2e8c52.tar.bz2
portage-e3910954d4898fd86c17999d0d4521d5dc2e8c52.zip
Fix EditablePackageSet.update() to create Atom instances when necessary.
svn path=/main/trunk/; revision=10525
-rw-r--r--pym/portage/sets/base.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/pym/portage/sets/base.py b/pym/portage/sets/base.py
index 416626320..717b16322 100644
--- a/pym/portage/sets/base.py
+++ b/pym/portage/sets/base.py
@@ -158,11 +158,15 @@ class EditablePackageSet(PackageSet):
modified = False
normal_atoms = []
for a in atoms:
- if isvalidatom(a):
- normal_atoms.append(a)
- else:
- modified = True
- self._nonatoms.add(a)
+ if not isinstance(a, Atom):
+ try:
+ a = Atom(a)
+ except InvalidAtom:
+ modified = True
+ self._nonatoms.add(a)
+ continue
+ normal_atoms.append(a)
+
if normal_atoms:
modified = True
self._atoms.update(normal_atoms)