Merge pull request #3700 from Jessonsotoventura/confirm_quit
Ctrl-C should prompt the user before exiting
This commit is contained in:
commit
2d01c81c1f
|
@ -114,7 +114,7 @@ def run(
|
|||
loop = asyncio.get_event_loop()
|
||||
for signame in ('SIGINT', 'SIGTERM'):
|
||||
try:
|
||||
loop.add_signal_handler(getattr(signal, signame), master.shutdown)
|
||||
loop.add_signal_handler(getattr(signal, signame), getattr(master, "prompt_for_exit", master.shutdown))
|
||||
except NotImplementedError:
|
||||
# Not supported on Windows
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue