Ejemplo n.º 1
0
 def __getitem__(self, name):
     try:
         return BaseNode.__getitem__(self, name)
     except KeyError:
         if not name in self.iterkeys():
             raise KeyError(name)
         user = User(self.ldap_users[name], name, self)
         self[name] = user
         return user
Ejemplo n.º 2
0
 def __getitem__(self, name):
     try:
         return BaseNode.__getitem__(self, name)
     except KeyError:
         if not name in self.iterkeys():
             raise KeyError(name)
         # XXX: Group(ldapNode, name, self)
         group = Group(BaseNode(), name, self)
         self[name] = group
         return group