equal
deleted
inserted
replaced
68 def execscript_confirm(scriptpath): |
68 def execscript_confirm(scriptpath): |
69 """asks for confirmation before executing a script and provides the |
69 """asks for confirmation before executing a script and provides the |
70 ability to show the script's content |
70 ability to show the script's content |
71 """ |
71 """ |
72 while True: |
72 while True: |
73 answer = ASK.ask('Execute %r ?' % scriptpath, ('Y','n','show'), 'Y') |
73 answer = ASK.ask('Execute %r ?' % scriptpath, |
74 if answer == 'n': |
74 ('Y','n','show','abort'), 'Y') |
|
75 if answer == 'abort': |
|
76 raise SystemExit(1) |
|
77 elif answer == 'n': |
75 return False |
78 return False |
76 elif answer == 'show': |
79 elif answer == 'show': |
77 stream = open(scriptpath) |
80 stream = open(scriptpath) |
78 scriptcontent = stream.read() |
81 scriptcontent = stream.read() |
79 stream.close() |
82 stream.close() |