Search sizelimit not working?

Michael Ströder michael at
Tue Jun 3 17:06:44 CEST 2003

Ed . wrote:
> I want to run a query which will return more results than the server 
> permits. If I specify sizelimit to get a fixed and (smaller than server 
> limit) amount I get an exception.
> [..]
> l.simple_bind_s(",")
BTW: This is wrong.

>    res = l.search_ext_s("", ldap.SCOPE_SUBTREE, "sn=jones*", 
> sizelimit=5)

I couldn't figure out in OpenLDAP's man pages and 
draft-ietf-ldapext-ldap-c-api-05 whether the python-ldap wrapping in 
Modules/LDAPObject.c is wrong or whether raising the exception based on 
non-zero error code is right. (I suspect there is a wrong understanding of 
the OpenLDAP's error handling in python-ldap's C part.)

The synchronous methods are at the moment not suitable for retrieving 
partial results. You could use module ldap.async for that purpose. Wow! 
There's even an example in the docs. :-)

Ciao, Michael.

More information about the python-ldap mailing list