Blob Blame History Raw
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 9effddd..a950228 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -526,7 +526,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
             try:
                 if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT) == 1:
                     raise TestFailed("tests should never set the SO_REUSEPORT "   \