MatchingRuleUse

Michael Ströder michael at stroeder.com
Sun Mar 30 17:54:12 CEST 2003


Jerry Lee wrote:
> 
> I've been working with ldap.schema.models and came across a problem with 
> MatchingRuleUse.
> 
> suppose that:
> 
> attrClass = MatchingRuleUse
> oids = self.schema.listall(attrClass)
> 
> for oid in oids :
>   object = self.schema.get_obj(attrClass, oid)
>   if not isinstance(object, attrClass):
>      print "Ooopsie!!!!!!!!!!!!!!!!!!!!!!!!!"
>      print attrClass.schema_attribute + '  ***    ' + 
> object.schema_attribute
> 
> 
> What happens is I hit the 'if' for every OID.
> 
> That is, the call to get_obj returns an object of class MatchingRule 
> instead of MatchingRuleUse.

Please test(!) ldap.schema from CVS since I reworked it today to maintain 
separate dictionaries for each schema element class.

Ciao, Michael.



More information about the python-ldap mailing list