torsava / rpms / python3

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