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()
|
loop = asyncio.get_event_loop()
|
||||||
for signame in ('SIGINT', 'SIGTERM'):
|
for signame in ('SIGINT', 'SIGTERM'):
|
||||||
try:
|
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:
|
except NotImplementedError:
|
||||||
# Not supported on Windows
|
# Not supported on Windows
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue