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: |