Пример #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