use colors only if stdout and stderr are both ttys

This commit is contained in:
Thomas Nagy 2012-05-27 23:43:43 +02:00
parent 3557c4caf3
commit 34bb10d935
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ colors_lst = {
got_tty = not os.environ.get('TERM', 'dumb') in ['dumb', 'emacs']
if got_tty:
try:
got_tty = sys.stderr.isatty()
got_tty = sys.stderr.isatty() and sys.stdout.isatty()
except AttributeError:
got_tty = False