diff options
author | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2012-04-07 20:38:44 (GMT) |
---|---|---|
committer | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2012-04-07 20:38:44 (GMT) |
commit | 52a11f1f467959d370a47f2a63b150234a6338d0 (patch) | |
tree | 407a789885b220773c32e025a78e7ad663a076c5 /Lib | |
parent | 8798ad3e1e0647554cb68033c6b25b7b22e2a19d (diff) | |
download | cpython-52a11f1f467959d370a47f2a63b150234a6338d0.zip cpython-52a11f1f467959d370a47f2a63b150234a6338d0.tar.gz cpython-52a11f1f467959d370a47f2a63b150234a6338d0.tar.bz2 |
Issue #14310: Catch testing errors when trying to create unsupported socket
types on some platforms.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_socket.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 6da423a..092e94f 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -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) |