summaryrefslogtreecommitdiff
path: root/Lib/asyncio/unix_events.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-11-09 15:48:22 -0500
committerYury Selivanov <yury@magic.io>2016-11-09 15:48:22 -0500
commit02f252f3af496f297dc8fc1f35a0634a686612a2 (patch)
tree3eba678ffc82ab4f37d216d565c6f2611a4ad340 /Lib/asyncio/unix_events.py
parentf787c90764d8e6d103bd72e50abd91dd84fce917 (diff)
parent954c7dd0ccbe01668856d6a9816aeb1fe07bce7e (diff)
downloadcpython-git-02f252f3af496f297dc8fc1f35a0634a686612a2.tar.gz
Merge 3.6 (issue #28652)
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r--Lib/asyncio/unix_events.py4
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))