Don't use assertion for expected error
This commit is contained in:
parent
7096ab74e8
commit
a9804dd550
@ -260,7 +260,8 @@ def serve(configuration, shutdown_socket=None):
|
|||||||
logger.info("Listening on %r%s",
|
logger.info("Listening on %r%s",
|
||||||
format_address(server.server_address),
|
format_address(server.server_address),
|
||||||
" with SSL" if use_ssl else "")
|
" with SSL" if use_ssl else "")
|
||||||
assert servers, "no servers started"
|
if not servers:
|
||||||
|
raise RuntimeError("No servers started")
|
||||||
|
|
||||||
# Mainloop
|
# Mainloop
|
||||||
select_timeout = None
|
select_timeout = None
|
||||||
|
Loading…
Reference in New Issue
Block a user