diff options
author | shnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2007-03-14 13:23:04 +0000 |
---|---|---|
committer | shnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2007-03-14 13:23:04 +0000 |
commit | b7e6157cfab8e7f5f36fcce9ed6d197993c0b17e (patch) | |
tree | bc9620594945a8f3bbd9ce5e6a6405d7f07f273c /src | |
parent | 61e0716bea42cfd995842fe94b4fc24649780b53 (diff) | |
download | sos-b7e6157cfab8e7f5f36fcce9ed6d197993c0b17e.tar.gz |
fixed BZ#219877 (ncurses "Cancel" button makes sosreport exit)
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@92 ef72aa8b-4018-0410-8976-d6e080ef94d8
Diffstat (limited to 'src')
-rwxr-xr-x | src/sosreport | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sosreport b/src/sosreport index 3989ff0b..e5956b7c 100755 --- a/src/sosreport +++ b/src/sosreport @@ -160,10 +160,13 @@ def get_curse_options(alloptions): g = GridForm(screen, "Select Sosreport Options", 1, 10) g.add(plugCbox, 0, 0) g.add(bb, 0, 1, growx = 1) - g.runOnce() + result = g.runOnce() screen.finish() + if bb.buttonPressed(result) == "cancel": + raise "Cancelled" + for rrr in range(0, optDicCounter): optDic[rrr][3]['enabled'] = plugCbox.getEntryValue(rrr)[1] out.append((optDic[rrr])) @@ -269,7 +272,10 @@ def sosreport(): if not __cmdLineOpts__.fastoptions and not __cmdLineOpts__.usealloptions: if len(alloptions): - get_curse_options(alloptions) + try: + get_curse_options(alloptions) + except "Cancelled": + sys.exit("Exiting.") else: print "no options available for selected plugins" elif __cmdLineOpts__.fastoptions: |