Bug 434798 - Tools need to handle KeyboardInterrupt
Summary: Tools need to handle KeyboardInterrupt
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: freeIPA
Classification: Retired
Component: ipa-admintools
Version: 1.0
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
: 434908 (view as bug list)
Depends On:
Blocks: 429034 435171
TreeView+ depends on / blocked
 
Reported: 2008-02-25 16:04 UTC by Rob Crittenden
Modified: 2015-01-04 23:30 UTC (History)
1 user (show)

Fixed In Version: freeipa-2.0.0-1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


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

Description Rob Crittenden 2008-02-25 16:04:14 UTC
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 14:07:33 UTC
*** Bug 434908 has been marked as a duplicate of this bug. ***

Comment 2 Rob Crittenden 2008-02-27 15:43:25 UTC
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 22:22:09 UTC
Committed in changeset 694

Comment 4 Yi Zhang 2008-05-28 23:03:25 UTC
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.