Using python-ldap with web2ldap

Michael Ströder michael at stroeder.com
Wed Oct 17 20:00:17 CEST 2001


Art Vossberg wrote:
> [..]
> Traceback (most recent call last):
> [..]
> NameError: cannot set that field
> [..]
> Obviously, most of this data is environmental data, but the last several
> lines indicate a setoption or __setattr__ problem.

FYI: With web2ldap I already try to handle differences of
python-ldap built against different versions of the OpenLDAP libs.
This works fairly well with the patches exposing the "version"
attribute. I take the presence of the "version" attribute as
indicator that the OpenLDAP 2 libs are used.

However if the python-ldap was built against OpenLDAP 2 libs with
patches which does not expose the "version" attribute it is assumed
that the OpenLDAP 1 libs are in place and setting the LDAP
connection options via attribute "options" obviously fails.

For those of you interested in the gory details check out module
ldapsession.py shipped with web2ldap.

Ciao, Michael.




More information about the python-ldap mailing list