mirror of https://github.com/python/cpython
Issue #14310: Catch testing errors when trying to create unsupported socket
types on some platforms.
This commit is contained in:
parent
8798ad3e1e
commit
52a11f1f46
|
@ -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…
Reference in New Issue