From 7b0af2d80d617915fb80e2ad9a8e16eff5d49c73 Mon Sep 17 00:00:00 2001 From: Andres Sanchez Date: Wed, 31 Oct 2018 13:35:03 -0600 Subject: [PATCH] Handle loop exception in app.py --- sanic/app.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sanic/app.py b/sanic/app.py index 8d9cf5b0..477fb6d6 100644 --- a/sanic/app.py +++ b/sanic/app.py @@ -835,6 +835,11 @@ class Sanic: access_log=True, **kwargs ): + try: + assert "loop" not in kwargs + 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 signal. On termination, drain connections before closing.