]> granicus.if.org Git - python/commitdiff
asyncio: Make tests pass on Windows.
authorGuido van Rossum <guido@python.org>
Tue, 18 Feb 2014 18:24:30 +0000 (10:24 -0800)
committerGuido van Rossum <guido@python.org>
Tue, 18 Feb 2014 18:24:30 +0000 (10:24 -0800)
Lib/asyncio/streams.py

index 698c5c6b184201903897b791287ddb9b4a0d4758..27d595f17410c899342566e9e85b850427e46b63 100644 (file)
@@ -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