ldap.schema: str2objectclass() fails

Jacek Konieczny jajcus at bnet.pl
Sun Jul 28 11:06:37 CEST 2002


On Sat, Jul 27, 2002 at 10:38:35PM +0200, Michael Ströder wrote:
> 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.
Here is a fragment of Modules/schema.c:

  o = ldap_str2objectclass( oc_string, &ret, &errp, flag);
  if (ret) {
    printf("Error: %d: %s", ret, errp);
    /* XXX Do error handling... */
    return NULL;
  }

It seems ldap_str2objectclass() fails, but no proper python-way error
hadnling is done. The fix should be easy (just replace 
/* XXX Do error handling... */ with exception object initialization).
Unfortunately I am not able to do it now (lack of time) :-(

Greets,
        Jacek





More information about the python-ldap mailing list