aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/master.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2018-03-31 19:27:26 +1300
committerAldo Cortesi <aldo@corte.si>2018-04-01 09:46:32 +1200
commit54170ee6572e8ba38b94a4e51f3c8e832e5f9ac7 (patch)
treed3599a5d913e8bb37c82718ffe3ccaae46130d1e /mitmproxy/master.py
parentd9752c90f97f6ee7f2283ddafe3cde2553230789 (diff)
downloadmitmproxy-54170ee6572e8ba38b94a4e51f3c8e832e5f9ac7.tar.gz
mitmproxy-54170ee6572e8ba38b94a4e51f3c8e832e5f9ac7.tar.bz2
mitmproxy-54170ee6572e8ba38b94a4e51f3c8e832e5f9ac7.zip
asyncio: start a test loop for unit tests
Also move signal handling out of master. These only work in the main thread, and properly belong in main.py.
Diffstat (limited to 'mitmproxy/master.py')
-rw-r--r--mitmproxy/master.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/mitmproxy/master.py b/mitmproxy/master.py
index 31849a88..a23be0a7 100644
--- a/mitmproxy/master.py
+++ b/mitmproxy/master.py
@@ -36,9 +36,6 @@ class Master:
The master handles mitmproxy's main event loop.
"""
def __init__(self, opts):
- loop = asyncio.get_event_loop()
- for signame in ('SIGINT', 'SIGTERM'):
- loop.add_signal_handler(getattr(signal, signame), self.shutdown)
self.event_queue = asyncio.Queue()
self.options = opts or options.Options() # type: options.Options