Search sizelimit not working?

Ed . epo001 at
Tue Jun 3 16:06:37 CEST 2003

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.

Here is a sample program:
import ldap

l = ldap.initialize("ldap://")


res = "No results"
    res = l.search_ext_s("", ldap.SCOPE_SUBTREE, "sn=jones*", 
    # This prints all results the server permits
    #res = l.search_s("", ldap.SCOPE_SUBTREE, "sn=jones*")
except ldap.LDAPError, e:
    print e
print res

Running this what I'd expect is to get back 5 results, what I get is a size 
limit exceeded exception. If I run the other form of search then I get back 
some 150 results.

What am I doing wrong?


More information about the python-ldap mailing list