Skip to content
Snippets Groups Projects
Commit 7e5b09be authored by Sybren A. Stüvel's avatar Sybren A. Stüvel
Browse files

Avoid patching asyncio on Windows

parent a5bfcfe6
No related branches found
No related tags found
No related merge requests found
......@@ -9,15 +9,19 @@ This prevents an error at the end of a subprocess execution:
"""
import asyncio.unix_events as ue
def patch_asyncio():
import logging
import sys
log = logging.getLogger(__name__)
if sys.platform == 'win32':
log.debug('Patching ue._UnixReadPipeTransport.resume_reading not needed on Windows')
return
log.debug('Patching ue._UnixReadPipeTransport.resume_reading')
import asyncio.unix_events as ue
orig_resume_reading = ue._UnixReadPipeTransport.resume_reading
def resume_reading(self, *args, **kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment