Commit 68482fb5 authored by Benjamin Peterson's avatar Benjamin Peterson

expect socket.error instead of the py3ism OSError

parent e208b570
......@@ -473,7 +473,7 @@ def _is_ipv6_enabled():
sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
sock.bind((HOSTv6, 0))
return True
except OSError:
except socket.error:
pass
finally:
if sock:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment