Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for running in pythonw #2448

Merged
merged 11 commits into from Jun 19, 2022
2 changes: 1 addition & 1 deletion sanic/mixins/runner.py
Expand Up @@ -424,7 +424,7 @@ def _helper(

self.motd(self.serve_location)

if sys.stdout.isatty() and not self.state.is_debug:
if sys.stdout and sys.stdout.isatty() and not self.state.is_debug:
timmo001 marked this conversation as resolved.
Show resolved Hide resolved
error_logger.warning(
f"{Colors.YELLOW}Sanic is running in PRODUCTION mode. "
"Consider using '--debug' or '--dev' while actively "
Expand Down