[Freeipa-devel] [PATCH] Add exception callback (exc_callback) to baseldap.py classes.

Rob Crittenden rcritten at redhat.com
Mon May 10 18:38:22 UTC 2010


Pavel Zuna wrote:
> The new callback enables plugin authors to supply their own handler for 
> ExecutionError exceptions generated by calls to ldap2 made from the 
> execute method of baseldap.py classes that extend CallbackInterface.
> 
> Pavel

I don't see any reference to EXC_CALLBACKS other than in registration. 
It looks like this provides a registration system then just calls the 
top exc_callback call.

I see the default exc_callback() is just a raise. I think this should 
always be called last to raise the exception if things get that far. 
This way the plugin author doesn't have to remember to raise themselves 
if whatever condition they're looking for isn't met (which your second 
patch doesn't do).

I like where this is going, just needs a little more work.

rob




More information about the Freeipa-devel mailing list