Schema-API
Michael Ströder
michael at stroeder.com
Wed Aug 7 22:03:51 CEST 2002
Jens Vagelpohl wrote:
> i'm trying to run the Demo/schema.py script and steppping through it
> with pdb there's an oddity i see, which prevents the script from running
> successfully:
>
> - ldapobject.py line 548 (in method search_subschemasubentry) a search
> is done on the passed-in DN to retrieve the value for the attribute
> "subschemaSubentry". the search is successful and returns...
>
> [('dc=vts,dc=zope,dc=com', {'subschemaSubentry': ['cn=Subschema']})]
>
> - in line 555 there is the following call:
>
> e = ldap.cidict.cidict(r[0][1]) (r is the result shown above)
>
> - at this point "e" has the following value:
>
> {'subschemasubentry': ['cn=Subschema']} (notice: "subschemasubentry" is
> all lowercase now)
>
> - now the problem is in line 556 in the call...
>
> search_subschemasubentry_dn = e.get('subschemaSubentry', [None])[]
Yes, no problem since ldap.cidict.cidict is used. I wouldn't claim
that there is no bug. But I can't see a problem.
> ... at this point the result is None and the script dies a little later.
"Dies a little later" is a little bit unspecific. Can you please
provide the traceback and mention which LDAP server you're using
for testing?
Ciao, Michael.
More information about the python-ldap
mailing list