Beispiel #1
0
 def result(self, msgid=ldap.RES_ANY, all=1, timeout=None):
     objtype, data = IPASimpleLDAPObject.result(self, msgid, all, timeout)
     # data is either a 2-tuple or a list of 2-tuples
     if data:
         if isinstance(data, tuple):
             return objtype, Entry(data)
         elif isinstance(data, list):
             return objtype, [Entry(x) for x in data]
         else:
             raise TypeError, "unknown data type %s returned by result" % type(data)
     else:
         return objtype, data
Beispiel #2
0
 def add_ext_s(self, dn, modlist, serverctrls=None, clientctrls=None):
     if isinstance(dn, Entry):
         return IPASimpleLDAPObject.add_ext_s(self, dn.dn, dn.toTupleList(), serverctrls, clientctrls)
     else:
         return IPASimpleLDAPObject.add_ext_s(self, dn, modlist, serverctrls, clientctrls)
Beispiel #3
0
 def add_s(self, dn, modlist):
     if isinstance(dn, Entry):
         return IPASimpleLDAPObject.add_s(self, dn.dn, dn.toTupleList())
     else:
         return IPASimpleLDAPObject.add_s(self, dn, modlist)
Beispiel #4
0
 def __init__(self, *args, **kwds):
     IPASimpleLDAPObject.__init__(self, *args, **kwds)