LDAP bind results failing

Michael Ströder michael at stroeder.com
Thu Oct 26 13:46:00 CEST 2006


Jim,

please stay on the python-ldap-dev mailing list (again Cc:-ed) with your
responses so others can comment as well!

Jim Boone wrote:
> l.simple_bind(dn,oldpass)
> valid=True
> except ldap.LDAPError, e:
> valid=False
> if valid:
> print "****************valid****************"
> else:
> print "--------------- nope ----------------"

You probably want to use the synchronous method
l.simple_bind_s(dn,oldpass). simple_bind() returns just a message ID
which you have pass to result().

Ciao, Michael.



More information about the python-ldap mailing list