Merge 3.5 (asyncio)

This commit is contained in:
Yury Selivanov 2016-05-20 17:44:44 -04:00
commit 010f361dad
2 changed files with 27 additions and 0 deletions

View file

@ -102,6 +102,11 @@ def _ipaddr_info(host, port, family, type, proto):
else:
return None
if port in {None, ''}:
port = 0
elif isinstance(port, (bytes, str)):
port = int(port)
if hasattr(socket, 'inet_pton'):
if family == socket.AF_UNSPEC:
afs = [socket.AF_INET, socket.AF_INET6]