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://foo.com:389")
l.simple_bind_s(",")
res = "No results"
try:
res = l.search_ext_s("o=foo.com", ldap.SCOPE_SUBTREE, "sn=jones*",
sizelimit=5)
# This prints all results the server permits
#res = l.search_s("o=foo.com", 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?
Ed
_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger
http://www.msn.co.uk/messenger
|