Skip to content

Commit

Permalink
bpo-46239: improve error message when importing `asyncio.windows_even…
Browse files Browse the repository at this point in the history
…ts` (GH-30353)

(cherry picked from commit 5a2a650)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
  • Loading branch information
miss-islington and sobolevn committed Jan 4, 2022
1 parent 4affb99 commit 86d1b8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 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
Expand Down
@@ -0,0 +1,2 @@
Improve error message when importing :mod:`asyncio.windows_events` on
non-Windows.

0 comments on commit 86d1b8c

Please sign in to comment.