Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r10523 - main/trunk/pym/portage/sets
Date: Sat, 31 May 2008 23:10:20
Message-Id: E1K2aDG-00037e-Qf@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-05-31 23:10:14 +0000 (Sat, 31 May 2008)
3 New Revision: 10523
4
5 Modified:
6 main/trunk/pym/portage/sets/base.py
7 Log:
8 Make PackageSet._setAtoms() use existing Atom instances when available.
9
10
11 Modified: main/trunk/pym/portage/sets/base.py
12 ===================================================================
13 --- main/trunk/pym/portage/sets/base.py 2008-05-31 20:15:45 UTC (rev 10522)
14 +++ main/trunk/pym/portage/sets/base.py 2008-05-31 23:10:14 UTC (rev 10523)
15 @@ -61,13 +61,18 @@
16 self._atoms.clear()
17 self._nonatoms.clear()
18 for a in atoms:
19 - a = a.strip()
20 - if not a:
21 - continue
22 - try:
23 - self._atoms.add(Atom(a))
24 - except InvalidAtom:
25 - self._nonatoms.add(a)
26 + if not isinstance(a, Atom):
27 + if isinstance(a, basestring):
28 + a = a.strip()
29 + if not a:
30 + continue
31 + try:
32 + a = Atom(a)
33 + except InvalidAtom:
34 + self._nonatoms.add(a)
35 + continue
36 + self._atoms.add(a)
37 +
38 self._updateAtomMap()
39
40 def load(self):
41
42 --
43 gentoo-commits@l.g.o mailing list