Skip to content

Commit

Permalink
disable colors on windows, fix #231 (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin authored May 21, 2019
1 parent c2a5338 commit faf4b4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aiohttp_devtools/logs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import logging
import logging.config
import platform
import re
import traceback
from io import StringIO
Expand Down Expand Up @@ -30,7 +31,7 @@
class HighlightStreamHandler(logging.StreamHandler):
def setFormatter(self, fmt):
self.formatter = fmt
self.formatter.stream_is_tty = isatty(self.stream)
self.formatter.stream_is_tty = isatty(self.stream) and platform.system().lower() != 'windows'


class DefaultFormatter(logging.Formatter):
Expand Down

0 comments on commit faf4b4a

Please sign in to comment.