Closed macosforgebot closed 18 years ago
@cyrusdaboo originally submitted this as comment:1:ticket:51
I agree - better error handling is needed in PyKerberos. I prefer the solution of raising an exception - new exception type should be defined in PyKerberos for that.
agx@… originally submitted this as comment:2:ticket:51
Just for reference a patch that implements this is here: https://honk.sigxcpu.org/unsorted-patches/pykerberos-exception-handling.diff
In case that matters (contribution terms) it's APL 2.0. I keep the patch outside of the Trac since updating patches in Trac is so cumbersome and it might need a few revisions until you're happy with it. Any comments?
Cheers,
-- Guido
agx@… originally submitted this as comment:3:ticket:51
...and here's the patch to move calendarserver over to the new exception aware API:
https://honk.sigxcpu.org/unsorted-patches/calendarserver-pykerberos-exceptions.diff
Cheers,
-- Guido
@cyrusdaboo originally submitted this as comment:4:ticket:51
agx@… originally submitted this as ticket:51
Errorhandling in pykerberos is currently very poor - especially in the gssapi case. We can only check for 0 and -1. I see two ways out of this: we modify the functions to also return the output of get_gss_error or (what I'd like better) throw an exception that has the get_gss_error output as textual represenations. Without this, the module is kind of hard to use since there are little ways to diagnose errors. Any thoughs?