server/sources/ldapuser.py
changeset 8695 358d8bed9626
parent 8674 001c1592060a
child 8707 28cbd267e96b
equal deleted inserted replaced
8694:d901c36bcfce 8695:358d8bed9626
   236         generator = RQL2LDAPFilter(self, session, args, mainvars)
   236         generator = RQL2LDAPFilter(self, session, args, mainvars)
   237         for mainvar in mainvars:
   237         for mainvar in mainvars:
   238             # handle restriction
   238             # handle restriction
   239             try:
   239             try:
   240                 eidfilters_, ldapfilter = generator.generate(rqlst, mainvar)
   240                 eidfilters_, ldapfilter = generator.generate(rqlst, mainvar)
   241             except GotDN, ex:
   241             except GotDN as ex:
   242                 assert ex.dn, 'no dn!'
   242                 assert ex.dn, 'no dn!'
   243                 try:
   243                 try:
   244                     res = [self._cache[ex.dn]]
   244                     res = [self._cache[ex.dn]]
   245                 except KeyError:
   245                 except KeyError:
   246                     res = self._search(session, ex.dn, BASE)
   246                     res = self._search(session, ex.dn, BASE)
   247             except UnknownEid, ex:
   247             except UnknownEid as ex:
   248                 # raised when we are looking for the dn of an eid which is not
   248                 # raised when we are looking for the dn of an eid which is not
   249                 # coming from this source
   249                 # coming from this source
   250                 res = []
   250                 res = []
   251             else:
   251             else:
   252                 eidfilters += eidfilters_
   252                 eidfilters += eidfilters_