From: Kristján Valur Jónsson Date: Sat, 7 Apr 2012 20:38:44 +0000 (+0000) Subject: Issue #14310: Catch testing errors when trying to create unsupported socket X-Git-Tag: v3.3.0a3~290 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52a11f1f467959d370a47f2a63b150234a6338d0;p=python Issue #14310: Catch testing errors when trying to create unsupported socket types on some platforms. --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 6da423ac69..092e94f380 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)