server/sources/ldapuser.py
changeset 7398 26695dd703d8
parent 7121 c2badb6de3fe
child 7399 972ed1843bd8
equal deleted inserted replaced
7397:6a9e66d788b3 7398:26695dd703d8
   522     def _search(self, session, base, scope,
   522     def _search(self, session, base, scope,
   523                 searchstr='(objectClass=*)', attrs=()):
   523                 searchstr='(objectClass=*)', attrs=()):
   524         """make an ldap query"""
   524         """make an ldap query"""
   525         self.debug('ldap search %s %s %s %s %s', self.uri, base, scope,
   525         self.debug('ldap search %s %s %s %s %s', self.uri, base, scope,
   526                    searchstr, list(attrs))
   526                    searchstr, list(attrs))
   527         # XXX for now, we do not have connection pool support for LDAP, so
   527         # XXX for now, we do not have connections set support for LDAP, so
   528         # this is always self._conn
   528         # this is always self._conn
   529         cnx = session.pool.connection(self.uri).cnx
   529         cnx = session.cnxset.connection(self.uri).cnx
   530         try:
   530         try:
   531             res = cnx.search_s(base, scope, searchstr, attrs)
   531             res = cnx.search_s(base, scope, searchstr, attrs)
   532         except ldap.PARTIAL_RESULTS:
   532         except ldap.PARTIAL_RESULTS:
   533             res = cnx.result(all=0)[1]
   533             res = cnx.result(all=0)[1]
   534         except ldap.NO_SUCH_OBJECT:
   534         except ldap.NO_SUCH_OBJECT: