[Python-checkins] cpython: Issue #14310: Catch testing errors when trying to create unsupported socket
kristjan.jonsson
python-checkins at python.org
Sat Apr 7 22:39:52 CEST 2012
http://hg.python.org/cpython/rev/9b858096044e
changeset: 76157:9b858096044e
user: Kristján Valur Jónsson <kristjan at ccpgames.com>
date: Sat Apr 07 20:38:44 2012 +0000
summary:
Issue #14310: Catch testing errors when trying to create unsupported socket
types on some platforms.
files:
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
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -4735,7 +4735,10 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list