aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/base_events.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2016-06-02 16:43:52 -0400
committerYury Selivanov <yselivanov@sprymix.com>2016-06-02 16:43:52 -0400
commita8f895f051588cc5186650f13118b0149ae7e3d5 (patch)
tree907d0a08cd880cddb722201fd2d2c3e4c57e8f60 /Lib/asyncio/base_events.py
parent6a8e626a60baef76b03df81a0b087dc9fdc3efcf (diff)
downloadcpython-a8f895f051588cc5186650f13118b0149ae7e3d5.tar.gz
cpython-a8f895f051588cc5186650f13118b0149ae7e3d5.zip
asyncio: Support host=b'' for getaddrinfo
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r--Lib/asyncio/base_events.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index ac1089ace49..e5feb998574 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -102,7 +102,7 @@ def _ipaddr_info(host, port, family, type, proto):
else:
return None
- if port in {None, ''}:
+ if port in {None, '', b''}:
port = 0
elif isinstance(port, (bytes, str)):
port = int(port)