Commits

Anonymous committed 1f22e25

Don't color output if stdout is not a tty.

Comments (0)

Files changed (1)

         elif opt == '-N':
             nocolor()
 
-    if sys.platform == 'win32':
+    if not sys.stdout.isatty() or sys.platform == 'win32':
         # Windows' cmd box doesn't understand ANSI sequences
         nocolor()