python36/00173-workaround-ENOPROTOOPT-in-bind_port.patch

14 lines
946 B
Diff
Raw Normal View History

diff -up Python-3.3.0/Lib/test/support.py.rhbz913732 Python-3.3.0/Lib/test/support.py
--- Python-3.4.0a4/Lib/test/support/__init__.py.rhbz913732 2013-03-04 16:25:53.885258476 -0500
+++ Python-3.4.0a4/Lib/test/support/__init__.py 2013-03-04 16:25:58.499258157 -0500
@@ -544,7 +544,8 @@ def bind_port(sock, host=HOST):
if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) == 1:
raise TestFailed("tests should never set the SO_REUSEADDR " \
"socket option on TCP/IP sockets!")
- if hasattr(socket, 'SO_REUSEPORT'):
+ if hasattr(socket, 'SO_REUSEPORT') \
+ and 'WITHIN_PYTHON_RPM_BUILD' not in os.environ: # rhbz#913732
if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT) == 1:
raise TestFailed("tests should never set the SO_REUSEPORT " \
"socket option on TCP/IP sockets!")