Merge pull request #1391 from AndresSan6/loop_exception

Handle "loop" exception in app.py
This commit is contained in:
Stephen Sadowski
2018-11-05 08:19:01 -06:00
committed by GitHub

View File

@@ -835,6 +835,14 @@ class Sanic:
access_log=True, access_log=True,
**kwargs **kwargs
): ):
if "loop" 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"
)
"""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.