diff options
-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: |