Assert was chnaged for an if and updated error messages
This commit is contained in:
parent
7b0af2d80d
commit
e63d0091af
|
@ -835,10 +835,8 @@ class Sanic:
|
||||||
access_log=True,
|
access_log=True,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
try:
|
if "loop" in kwargs:
|
||||||
assert "loop" not in kwargs
|
raise TypeError("loop is not a valid argument. To use an existing loop, change to create_server().\nSee more: https://sanic.readthedocs.io/en/latest/sanic/deploying.html#asynchronous-support")
|
||||||
except AssertionError:
|
|
||||||
raise TypeError("loop is not a valid argument. For asynchronous support, check https://sanic.readthedocs.io/en/latest/sanic/deploying.html#asynchronous-support")
|
|
||||||
|
|
||||||
"""Run the HTTP Server and listen until keyboard interrupt or term
|
"""Run the HTTP Server and listen until keyboard interrupt or term
|
||||||
signal. On termination, drain connections before closing.
|
signal. On termination, drain connections before closing.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user