Blame SOURCES/00173-workaround-ENOPROTOOPT-in-bind_port.patch

b54164
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
b54164
index 9effddd..a950228 100644
b54164
--- a/Lib/test/support/__init__.py
b54164
+++ b/Lib/test/support/__init__.py
b54164
@@ -526,7 +526,8 @@ def bind_port(sock, host=HOST):
23b3e9
             if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) == 1:
23b3e9
                 raise TestFailed("tests should never set the SO_REUSEADDR "   \
23b3e9
                                  "socket option on TCP/IP sockets!")
23b3e9
-        if hasattr(socket, 'SO_REUSEPORT'):
23b3e9
+        if hasattr(socket, 'SO_REUSEPORT') \
23b3e9
+                and 'WITHIN_PYTHON_RPM_BUILD' not in os.environ: # rhbz#913732
21eb11
             try:
21eb11
                 if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT) == 1:
21eb11
                     raise TestFailed("tests should never set the SO_REUSEPORT "   \