diff options
author | Yury Selivanov <yury@magic.io> | 2016-11-09 15:48:22 -0500 |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-11-09 15:48:22 -0500 |
commit | 02f252f3af496f297dc8fc1f35a0634a686612a2 (patch) | |
tree | 3eba678ffc82ab4f37d216d565c6f2611a4ad340 /Lib/asyncio/unix_events.py | |
parent | f787c90764d8e6d103bd72e50abd91dd84fce917 (diff) | |
parent | 954c7dd0ccbe01668856d6a9816aeb1fe07bce7e (diff) | |
download | cpython-git-02f252f3af496f297dc8fc1f35a0634a686612a2.tar.gz |
Merge 3.6 (issue #28652)
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r-- | Lib/asyncio/unix_events.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py index 2843678bba..46e91f65d8 100644 --- a/Lib/asyncio/unix_events.py +++ b/Lib/asyncio/unix_events.py @@ -235,7 +235,7 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop): if sock is None: raise ValueError('no path and sock were specified') if (sock.family != socket.AF_UNIX or - sock.type != socket.SOCK_STREAM): + not base_events._is_stream_socket(sock)): raise ValueError( 'A UNIX Domain Stream Socket was expected, got {!r}' .format(sock)) @@ -289,7 +289,7 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop): 'path was not specified, and no sock specified') if (sock.family != socket.AF_UNIX or - sock.type != socket.SOCK_STREAM): + not base_events._is_stream_socket(sock)): raise ValueError( 'A UNIX Domain Stream Socket was expected, got {!r}' .format(sock)) |