Merge pull request #3700 from Jessonsotoventura/confirm_quit

Ctrl-C should prompt the user before exiting
This commit is contained in:
Maximilian Hils 2019-11-16 12:04:59 +01:00 committed by GitHub
commit 2d01c81c1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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