From 52a11f1f467959d370a47f2a63b150234a6338d0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristj=C3=A1n=20Valur=20J=C3=B3nsson?= Date: Sat, 7 Apr 2012 20:38:44 +0000 Subject: [PATCH] Issue #14310: Catch testing errors when trying to create unsupported socket types on some platforms. --- Lib/test/test_socket.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.50.1