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 4, 2022
1 parent 5d683c6 commit b8dc16b
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 b8dc16b

Please sign in to comment.