diff --git a/sanic/compat.py b/sanic/compat.py index 27dfe5bef1..ae4e0f214f 100644 --- a/sanic/compat.py +++ b/sanic/compat.py @@ -25,10 +25,6 @@ def enable_windows_color_support(): kernel.SetConsoleMode(kernel.GetStdHandle(-11), 7) -def is_atty(): - return stdout and stdout.isatty() - - class Header(CIMultiDict): """ Container used for both request and response headers. It is a subclass of @@ -93,3 +89,7 @@ def ctrlc_handler(sig, frame): die = False signal.signal(signal.SIGINT, ctrlc_handler) app.add_task(stay_active) + + +def is_atty(): + return stdout and stdout.isatty()