]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blob - python/patches/00173-workaround-ENOPROTOOPT-in-bind_port.patch
python: Update to 2.7.5.
[people/stevee/ipfire-3.x.git] / python / patches / 00173-workaround-ENOPROTOOPT-in-bind_port.patch
1 diff -up Python-2.7.3/Lib/test/test_support.py.rhbz913732 Python-2.7.3/Lib/test/test_support.py
2 --- Python-2.7.3/Lib/test/test_support.py.rhbz913732 2013-03-04 16:11:53.757315921 -0500
3 +++ Python-2.7.3/Lib/test/test_support.py 2013-03-04 16:12:11.331314722 -0500
4 @@ -304,7 +304,8 @@ def bind_port(sock, host=HOST):
5 if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) == 1:
6 raise TestFailed("tests should never set the SO_REUSEADDR " \
7 "socket option on TCP/IP sockets!")
8 - if hasattr(socket, 'SO_REUSEPORT'):
9 + if hasattr(socket, 'SO_REUSEPORT') \
10 + and 'WITHIN_PYTHON_RPM_BUILD' not in os.environ: # rhbz#913732
11 if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT) == 1:
12 raise TestFailed("tests should never set the SO_REUSEPORT " \
13 "socket option on TCP/IP sockets!")