diff options
author | Maximilian Hils <git@maximilianhils.com> | 2019-11-16 12:04:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-16 12:04:59 +0100 |
commit | 2d01c81c1f0895e74d19ca2172ebbe4450febade (patch) | |
tree | 0b944e4d3964307fb2a4916afa6fba03d1582040 | |
parent | 5c0be1de4a19be845be4a63f96b0da01c0f2fad7 (diff) | |
parent | 5cb1746ef667ff4a4c1426c959d6ce6a34d74540 (diff) | |
download | mitmproxy-2d01c81c1f0895e74d19ca2172ebbe4450febade.tar.gz mitmproxy-2d01c81c1f0895e74d19ca2172ebbe4450febade.tar.bz2 mitmproxy-2d01c81c1f0895e74d19ca2172ebbe4450febade.zip |
Merge pull request #3700 from Jessonsotoventura/confirm_quit
Ctrl-C should prompt the user before exiting
-rw-r--r-- | mitmproxy/tools/_main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mitmproxy/tools/_main.py b/mitmproxy/tools/_main.py index a00a3e98..0163e8d3 100644 --- a/mitmproxy/tools/_main.py +++ b/mitmproxy/tools/_main.py @@ -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 |