Merge 3.5 (issue #28652)

This commit is contained in:
Yury Selivanov 2016-11-09 15:47:47 -05:00
commit 954c7dd0cc
6 changed files with 139 additions and 24 deletions

View file

@ -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))