Skip to content

Commit

Permalink
Add temporary workaround for issue 4324 (aio-libs/aiohttp#4324) of ai…
Browse files Browse the repository at this point in the history
…ohttp project.
  • Loading branch information
apleshakov committed Feb 3, 2020
1 parent 867063f commit c6789ff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion thespiae/install/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

from __future__ import annotations

from asyncio import gather, create_task, get_running_loop, run as aio_run
from asyncio import gather, create_task, get_running_loop, run as aio_run, set_event_loop_policy, \
DefaultEventLoopPolicy, WindowsSelectorEventLoopPolicy
from concurrent.futures import ThreadPoolExecutor
from hashlib import sha256
from io import SEEK_END
Expand All @@ -27,6 +28,7 @@
from re import fullmatch, ASCII
from shutil import copyfile, rmtree, unpack_archive
from subprocess import run as subprocess_run, CalledProcessError
import sys
from typing import TYPE_CHECKING
from winreg import OpenKeyEx, HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER, KEY_WOW64_32KEY, KEY_READ, KEY_WOW64_64KEY

Expand All @@ -45,6 +47,10 @@
from .data import DownloadSpec
from .protocol import Feedback

# TODO: remove for 4.x+ version of aiohttp (https://github.com/aio-libs/aiohttp/issues/4324) <AP>
if sys.platform == 'win32':
set_event_loop_policy(WindowsSelectorEventLoopPolicy())


def _test_key_present_view(root: int, path: str, key: str, view: int) -> bool:
try:
Expand Down

0 comments on commit c6789ff

Please sign in to comment.