mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Issue #14310: Catch testing errors when trying to create unsupported socket
types on some platforms.
This commit is contained in:
parent
8798ad3e1e
commit
52a11f1f46
1 changed files with 4 additions and 1 deletions
|
|
@ -4735,7 +4735,10 @@ class TestSocketSharing(SocketTCPTest):
|
|||
types = [socket.SOCK_STREAM, socket.SOCK_DGRAM]
|
||||
for f in families:
|
||||
for t in types:
|
||||
source = socket.socket(f, t)
|
||||
try:
|
||||
source = socket.socket(f, t)
|
||||
except OSError:
|
||||
continue # This combination is not supported
|
||||
try:
|
||||
data = source.share(os.getpid())
|
||||
shared = socket.fromshare(data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue