Skip to content

Commit

Permalink
Fix for running in pythonw
Browse files Browse the repository at this point in the history
  • Loading branch information
timmo001 committed May 12, 2022
1 parent 2bfa65e commit 037b286
Showing 1 changed file with 1 addition and 1 deletion.
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:
error_logger.warning(
f"{Colors.YELLOW}Sanic is running in PRODUCTION mode. "
"Consider using '--debug' or '--dev' while actively "
Expand Down

0 comments on commit 037b286

Please sign in to comment.