Permalink
Browse files

Don't try to colorize log output on terminals that don't support it

  • Loading branch information...
1 parent a4ba918 commit 32a31f4e8ed2385a71b228d605c15ec47ce4d85d Ben Darnell committed Mar 27, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 tornado/options.py
View
@@ -311,7 +311,8 @@ def enable_pretty_logging():
if curses and sys.stderr.isatty():
try:
curses.setupterm()
- color = True
+ if curses.tigetnum("colors") > 0:
+ color = True
except:
pass
channel = logging.StreamHandler()

0 comments on commit 32a31f4

Please sign in to comment.