diff options
author | Karthikeyan Singaravelan <tir.karthi@gmail.com> | 2020-01-11 05:16:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-11 05:16:30 (GMT) |
commit | 43682f1e39a3c61f0e8a638b887bcdcbfef766c5 (patch) | |
tree | b9e2cdc68e96f61d45cad30d04e5d71df8557f05 /Lib/socket.py | |
parent | ce54519aa09772f4173b8c17410ed77e403f3ebf (diff) | |
download | cpython-43682f1e39a3c61f0e8a638b887bcdcbfef766c5.zip cpython-43682f1e39a3c61f0e8a638b887bcdcbfef766c5.tar.gz cpython-43682f1e39a3c61f0e8a638b887bcdcbfef766c5.tar.bz2 |
Fix host in address of socket.create_server example. (GH-17706)
Host as None in address raises TypeError since it should be string, bytes or bytearray.
Diffstat (limited to 'Lib/socket.py')
-rwxr-xr-x | Lib/socket.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/socket.py b/Lib/socket.py index 374f112..cafa573 100755 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -878,7 +878,7 @@ def create_server(address, *, family=AF_INET, backlog=None, reuse_port=False, connections. When false it will explicitly disable this option on platforms that enable it by default (e.g. Linux). - >>> with create_server((None, 8000)) as server: + >>> with create_server(('', 8000)) as server: ... while True: ... conn, addr = server.accept() ... # handle new connection |