ldap.schema: str2objectclass() fails
Michael Ströder
michael at stroeder.com
Sat Jul 27 22:38:35 CEST 2002
HI!
ldap.schema.str2objectclass() fails when parsing the following
string (from Netscape DS 4.16SP1 sub schema sub entry):
"( 2.5.6.1 NAME 'alias' DESC 'Standard ObjectClass' SUP 'top' MUST
( objectclass $ aliasedObjectName ) MAY ( aci ) )"
This schema string does not look unusual to me but...
>>> ldap.schema.str2objectclass("( 2.5.6.1 NAME 'alias' DESC
'Standard ObjectClass' SUP 'top' MUST ( objectclass $
aliasedObjectName ) MAY ( aci ) )")
Error: 6: MUST ( objectclass $ aliasedObjectName ) MAY ( aci )
)Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/site-packages/ldap/schema.py", line
43, in str2objectclass
return
ldap.functions._ldap_function_call(_ldap.str2objectclass,schema_element_str)
File "/usr/lib/python2.2/site-packages/ldap/__init__.py", line
56, in _ldap_function_call
result = apply(func,args,kwargs)
SystemError: NULL result without error in PyObject_Call
>>>
Well, I'd like to see some better error reporting with the help of
exceptions. Anyway, there is a debug output text "Error: 6: .."
produced. Don't know whether by the OpenLDAP libs or some code in
Modules/schema.c.
Hans, before I ask on the OpenLDAP list what this error means can
you please review your code and test with the string above? Make
sure to bring your CVS working tree in sync!
Ciao, Michael.
More information about the python-ldap
mailing list