change in python-ldap method?

Joe Little jlittle at open-it.org
Mon Feb 25 23:59:14 CET 2002


Hello all,

In my latest project, I am exercising various parts of the Python-LDAP in my
wrapper API to see that everything works. Back in June, I had two methods,
an ldap entry refresh() and a commit(). These worked without a hitch, and
against data such as /etc/service entries in LDAP. Now, I do get an error,
and perhaps someone can enlighten me on what has changed and why.
Specifically, there is an entry in /etc/services for whois++. My refresh()
method calls ldap.explode_dn(leaf_entry) whereby leaf_entry is an attr
dictionary ala what python-ldap normally results as results. When it
explodes the DN out of my entry, its string result is:

"(cn=whois\+\+)"

However, even before I explode it, I already see the DN is stored in my res
as whois\+\+. Searching on this DN results in an ldap.FILTER_ERROR: {'desc':
'Bad search filter', 'info': ''}

whois++ has been in /etc/services for quite some time. So one of two things
has happened:

1) python-ldap has changed behavior in some way (whether first pull of data
or search filter usage)

2) MigrationTools (used to load up NIS type data to LDAP) from padl.com,
which fixed certain things associated with + and other symbols, can load
data correctly into LDAP with Perl ala PerLDAP and PythonLDAP doesn't
support the same.

Perhaps Leif knows best :)





More information about the python-ldap mailing list