Member since
03-07-2021
3
Posts
0
Kudos Received
0
Solutions
04-27-2022
09:37 AM
The root cause of this is PEP 3151, introduced in Python 3.3: PEP 3151 – Reworking the OS and IO exception hierarchy Python 3.3 release notes You can overcome this issue with the following changes in the file /usr/lib64/python2.7/test/test_support.py From: def _is_ipv6_enabled():
"""Check whether IPv6 is enabled on this host."""
if socket.has_ipv6:
sock = None
try:
sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
sock.bind((HOSTv6, 0))
return True
except OSError:
pass
finally:
if sock:
sock.close()
return False To: def _is_ipv6_enabled():
"""Check whether IPv6 is enabled on this host."""
if socket.has_ipv6:
sock = None
try:
sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
sock.bind((HOSTv6, 0))
return True
except socket.error if sys.version_info < (3, 3) else OSError: ---> this is how it should be
pass
finally:
if sock:
sock.close()
... View more