diff options
| author | Nikita Sobolev <mail@sobolevn.me> | 2022-01-04 08:44:26 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-04 08:44:26 (GMT) |
| commit | 5a2a65096c3ec2d37f33615f2a420d2ffcabecf2 (patch) | |
| tree | eeb09fd0d7f3fb21905747e467cf0312d4fe8bd6 /Lib/asyncio/windows_events.py | |
| parent | 1b111338cfe7840feea95e30ea8124063c450c65 (diff) | |
| download | cpython-5a2a65096c3ec2d37f33615f2a420d2ffcabecf2.zip cpython-5a2a65096c3ec2d37f33615f2a420d2ffcabecf2.tar.gz cpython-5a2a65096c3ec2d37f33615f2a420d2ffcabecf2.tar.bz2 | |
bpo-46239: improve error message when importing `asyncio.windows_events` (GH-30353)
Diffstat (limited to 'Lib/asyncio/windows_events.py')
| -rw-r--r-- | Lib/asyncio/windows_events.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py index 8c3d737..427d462 100644 --- a/Lib/asyncio/windows_events.py +++ b/Lib/asyncio/windows_events.py @@ -1,5 +1,10 @@ """Selector and proactor event loops for Windows.""" +import sys + +if sys.platform != 'win32': # pragma: no cover + raise ImportError('win32 only') + import _overlapped import _winapi import errno |
