Don't use assertion for expected error

This commit is contained in:
Unrud 2020-10-04 05:39:58 +02:00
parent 7096ab74e8
commit a9804dd550

View File

@ -260,7 +260,8 @@ def serve(configuration, shutdown_socket=None):
logger.info("Listening on %r%s",
format_address(server.server_address),
" with SSL" if use_ssl else "")
assert servers, "no servers started"
if not servers:
raise RuntimeError("No servers started")
# Mainloop
select_timeout = None