Ticket #51 (closed Enhancement: Software changed)
output of get_gss_error should be available to the caller
| Reported by: | agx@… | Owned by: | cdaboo@… |
|---|---|---|---|
| Priority: | 4: Nice to have | Milestone: | Later |
| Component: | PyKerberos | Severity: | Other |
| Keywords: | Cc: | agx@… | |
| Port: |
Description
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?
Change History
comment:1 Changed 7 years ago by cdaboo@…
- Priority changed from 5: Not set to 4: Nice to have
- Owner changed from wsanchez@… to cdaboo@…
- Status changed from new to assigned
- Type changed from Defect to Enhancement
- Milestone set to Later
comment:2 Changed 7 years ago by agx@…
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
comment:3 Changed 7 years ago by agx@…
...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


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.