[Date Prev][Date Next]
I'm using ldapmodule for Python (linked against OpenLDAP 1.2.11).
When using OpenLDAP 1.2.x server the module raises an exception
ldap.NO_SUCH_OBJECT which is very handy. With OpenLDAP 2.0beta
server ldapmodule returns an empty result list instead raising the
exception which breaks existing code.
Please review the answer of ldapmodule's author (see below) and
check if there was anything changed in the LDAP response from 1.2.x
to 2.0 in case an entry was not found.
-------- Original Message --------
Subject: Re: Behaviour when object is not found
Date: Fri, 11 Aug 2000 21:53:53 +1000 (EST)
From: David Leonard <email@example.com>
To: Michael Ströder <firstname.lastname@example.org>
CC: python-ldap-dev <email@example.com>
On Fri, 11 Aug 2000, Michael Ströder typed thusly:
> With OpenLDAP 2.0beta ldapmodule returns an empty result list
> instead which breaks existing code. I would expect that this is more
> a OpenLDAP 2.0 issue but before I start a discussion on
> firstname.lastname@example.org I would like to understand exactly under
> which conditions the exception ldap.NO_SUCH_OBJECT is raised.
if ldap_search() or ldap_result() returns -1 AND the LDAP structure
has its ld_errno field set to NO_SUCH_OBJECT, then that exception is
David Leonard David.Leonard@csee.uq.edu.au