summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/sets/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/portage/sets/__init__.py b/pym/portage/sets/__init__.py
index a7428c092..cab64279b 100644
--- a/pym/portage/sets/__init__.py
+++ b/pym/portage/sets/__init__.py
@@ -27,7 +27,8 @@ class PackageSet(object):
self._atoms = set()
self._atommap = {}
self._loaded = False
-
+ self._loading = False
+
def __contains__(self, atom):
return atom in self.getAtoms()
@@ -41,9 +42,11 @@ class PackageSet(object):
return op in self._operations
def getAtoms(self):
- if not self._loaded:
+ if not self._loaded and not self._loading:
+ self._loading = True
self.load()
self._loaded = True
+ self._loading = False
return self._atoms
def _setAtoms(self, atoms):