diff options
author | Rob Crittenden <rcritten@redhat.com> | 2008-02-27 10:40:18 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2008-02-27 10:40:18 -0500 |
commit | ad8096b51f1f8de2c05a5c53952fcb2cb5bbd116 (patch) | |
tree | a2e09d2c28e203b483b304bab72bae11dfecbf69 /ipa-python | |
parent | d5f5026454db98727d217fc109c7410bb80c3c4a (diff) | |
download | freeipa-ad8096b51f1f8de2c05a5c53952fcb2cb5bbd116.tar.gz freeipa-ad8096b51f1f8de2c05a5c53952fcb2cb5bbd116.tar.xz freeipa-ad8096b51f1f8de2c05a5c53952fcb2cb5bbd116.zip |
- Centralize try/except so the entire program is covered. This make it
possible to catch KeyboardInterrupt during the import process.
- Add function for handling python differences with GSSError
434798
Diffstat (limited to 'ipa-python')
-rw-r--r-- | ipa-python/ipautil.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ipa-python/ipautil.py b/ipa-python/ipautil.py index 4b1feb4c9..919d4a6b8 100644 --- a/ipa-python/ipautil.py +++ b/ipa-python/ipautil.py @@ -828,3 +828,15 @@ class ItemCompleter: return items +def get_gsserror(e): + """A GSSError exception looks differently in python 2.4 than it does + in python 2.5, deal with it.""" + + try: + primary = e[0] + secondary = e[1] + except: + primary = e[0][0] + secondary = e[0][1] + + return (primary[0], secondary[0]) |