BaseServer doesn't have __exit__ in Python < 3.6
This commit is contained in:
parent
93c1581e21
commit
6b9fc870c2
@ -325,8 +325,7 @@ def serve(configuration, shutdown_socket=None):
|
|||||||
|
|
||||||
with contextlib.ExitStack() as stack:
|
with contextlib.ExitStack() as stack:
|
||||||
for _, server in servers.items():
|
for _, server in servers.items():
|
||||||
# close server
|
stack.callback(server.server_close)
|
||||||
stack.push(server)
|
|
||||||
while True:
|
while True:
|
||||||
rlist, _, xlist = select.select(
|
rlist, _, xlist = select.select(
|
||||||
sockets, [], sockets, select_timeout)
|
sockets, [], sockets, select_timeout)
|
||||||
|
Loading…
Reference in New Issue
Block a user