]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blobdiff - python/patches/00173-workaround-ENOPROTOOPT-in-bind_port.patch
python: Update to 2.7.12.
[people/arne_f/ipfire-3.x.git] / python / patches / 00173-workaround-ENOPROTOOPT-in-bind_port.patch
index eb34610554fd892a4885657de01c6eb4e6dbf5b9..3e83d67917e5a16e17e9919aee2a8307f1060e77 100644 (file)
@@ -8,6 +8,7 @@ diff -up Python-2.7.3/Lib/test/test_support.py.rhbz913732 Python-2.7.3/Lib/test/
 -        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!")
+             try:
+                 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!")