From: Guido van Rossum Date: Tue, 18 Feb 2014 18:24:30 +0000 (-0800) Subject: asyncio: Make tests pass on Windows. X-Git-Tag: v3.4.0rc2~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3e786c96311e8926c58240cace075360033f9ca;p=thirdparty%2FPython%2Fcpython.git asyncio: Make tests pass on Windows. --- diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py index 698c5c6b1842..27d595f17410 100644 --- a/Lib/asyncio/streams.py +++ b/Lib/asyncio/streams.py @@ -2,12 +2,14 @@ __all__ = ['StreamReader', 'StreamWriter', 'StreamReaderProtocol', 'open_connection', 'start_server', - 'open_unix_connection', 'start_unix_server', 'IncompleteReadError', ] import socket +if hasattr(socket, 'AF_UNIX'): + __all__.extend(['open_unix_connection', 'start_unix_server']) + from . import events from . import futures from . import protocols