Bug 434798 - Tools need to handle KeyboardInterrupt
Tools need to handle KeyboardInterrupt
Status: CLOSED ERRATA
Product: freeIPA
Classification: Community
Component: ipa-admintools (Show other bugs)
1.0
All Linux
low Severity low
: ---
: ---
Assigned To: Rob Crittenden
Chandrasekar Kannan
:
: 434908 (view as bug list)
Depends On:
Blocks: 429034 435171
  Show dependency treegraph
 
Reported: 2008-02-25 11:04 EST by Rob Crittenden
Modified: 2015-01-04 18:30 EST (History)
1 user (show)

See Also:
Fixed In Version: freeipa-2.0.0-1.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
restructure the tools (76.36 KB, patch)
2008-02-27 10:43 EST, Rob Crittenden
no flags Details | Diff

  None (edit)
Description Rob Crittenden 2008-02-25 11:04:14 EST
If you press ctrl-C during an XML-RPC operation a KeyboardInterrupt error will
be thrown and not caught resulting in a backtrace.

A general Exception should also be added for non-specific errors.
Comment 1 Rob Crittenden 2008-02-26 09:07:33 EST
*** Bug 434908 has been marked as a duplicate of this bug. ***
Comment 2 Rob Crittenden 2008-02-27 10:43:25 EST
Created attachment 296076 [details]
restructure the tools

This is a potentially disruptive patch to all the admin tools. I wanted to be
able to catch KeyboardInterrupt but I needed to move all the imports under a
try/except in order to catch it in all cases. If one interrupted early enough
you'd catch it in the import phase which wasn't covered.

So I moved all the imports into a main try/except which calls our main. I moved
most other exceptions out of main into this top level try/except to make the
individual functions more readable.

I also found a difference in the way GSSError is handled in python 2.4 and
python 2.5 so I added a small helper to deal with it.
Comment 3 Rob Crittenden 2008-02-27 17:22:09 EST
Committed in changeset 694
Comment 4 Yi Zhang 2008-05-28 19:03:25 EDT
QA Verified on May 28, 2008 (Yi)

Build used: May 28, 2008 (i386)

Note You need to log in before you can comment on or make changes to this bug.