diff options
author | Maximilian Hils <git@maximilianhils.com> | 2020-04-03 12:23:00 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2020-04-03 12:23:00 +0200 |
commit | a1169ca3c3597b26dc408e97ec537547b9143d28 (patch) | |
tree | 7336273c3a7b3021ff0f5514c21640f129bffd47 | |
parent | 1e3f1b4d2bd7f82dd4ad6879c2beaecdfe209bc8 (diff) | |
download | mitmproxy-a1169ca3c3597b26dc408e97ec537547b9143d28.tar.gz mitmproxy-a1169ca3c3597b26dc408e97ec537547b9143d28.tar.bz2 mitmproxy-a1169ca3c3597b26dc408e97ec537547b9143d28.zip |
fix compatibility with Python 3.8 on Windows
-rw-r--r-- | mitmproxy/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mitmproxy/__init__.py b/mitmproxy/__init__.py index e69de29b..e930cf1e 100644 --- a/mitmproxy/__init__.py +++ b/mitmproxy/__init__.py @@ -0,0 +1,8 @@ +import asyncio +import sys + +if sys.platform == 'win32': + # workaround for + # https://github.com/tornadoweb/tornado/issues/2751 + # https://www.tornadoweb.org/en/stable/index.html#installation + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) |