svn path=/main/trunk/; revision=8300
self.aliases = shortnames
return self.aliases
+ def getSetAtoms(self, setname):
+ myset = self.getSetsWithAliases()[setname]
+ myatoms = myset.getAtoms()
+ for n in myset.getNonAtoms():
+ if n in self.aliases:
+ myatoms.update(self.getSetAtoms(n))
+ return myatoms
+
def make_default_config(settings, trees):
sc = SetConfig([], settings, trees)
sc.add_section("security")
self._loaded = False
self._loading = False
self.errors = []
+ self._nonatoms = set()
def __contains__(self, atom):
return atom in self.getAtoms()
self._loading = False
return self._atoms
+ def getNonAtoms(self):
+ self.getAtoms()
+ return self._nonatoms
+
def _setAtoms(self, atoms):
atoms = map(str.strip, atoms)
+ nonatoms = set()
for a in atoms[:]:
if a == "":
atoms.remove(a)
elif not isvalidatom(a):
- raise InvalidAtom(a)
+ atoms.remove(a)
+ self._nonatoms.add(a)
self._atoms = set(atoms)
self._updateAtomMap()