diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-07-17 21:16:37 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-07-17 21:16:37 +0000 |
commit | 085722d4efbf9db30b51b2e38460980bfe4a3e01 (patch) | |
tree | 6801b8284230d2aece5db82f9dd5342b9713dc57 | |
parent | e84c3512d8df54767db7ca7603387f85255933bd (diff) | |
download | portage-085722d4efbf9db30b51b2e38460980bfe4a3e01.tar.gz portage-085722d4efbf9db30b51b2e38460980bfe4a3e01.tar.bz2 portage-085722d4efbf9db30b51b2e38460980bfe4a3e01.zip |
Use PackageSet.getAtoms() as a wrapper around load() since load() can trigger unnecessary stat calls.
svn path=/main/trunk/; revision=7302
-rw-r--r-- | pym/portage/sets/__init__.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pym/portage/sets/__init__.py b/pym/portage/sets/__init__.py index d72c5c4f0..163e84eaf 100644 --- a/pym/portage/sets/__init__.py +++ b/pym/portage/sets/__init__.py @@ -114,12 +114,9 @@ class PackageSet(object): return None class EditablePackageSet(PackageSet): - def getAtoms(self): - self.load() - return self._atoms def update(self, atoms): - self.load() + self.getAtoms() self._atoms.update(atoms) self._updateAtomMap() self.write() @@ -132,13 +129,12 @@ class EditablePackageSet(PackageSet): self.write() def remove(self, atom): - self.load() + self.getAtoms() self._atoms.discard(atom) self._updateAtomMap() self.write() def removePackageAtoms(self, cp): - self.load() for a in self.getAtoms(): if dep_getkey(a) == cp: self.remove(a) |