aboutsummaryrefslogtreecommitdiffstats
path: root/src/sosreport
diff options
context:
space:
mode:
authorshnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8>2007-03-14 13:23:04 +0000
committershnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8>2007-03-14 13:23:04 +0000
commitb7e6157cfab8e7f5f36fcce9ed6d197993c0b17e (patch)
treebc9620594945a8f3bbd9ce5e6a6405d7f07f273c /src/sosreport
parent61e0716bea42cfd995842fe94b4fc24649780b53 (diff)
downloadsos-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/sosreport')
-rwxr-xr-xsrc/sosreport10
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: