From e4f8bde6ac7b56cff92d681632d6cfd7aa592546 Mon Sep 17 00:00:00 2001 From: pcarrier Date: Fri, 11 Feb 2011 16:20:42 +0000 Subject: [core] Improving 1083 git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@1084 ef72aa8b-4018-0410-8976-d6e080ef94d8 --- sos/sosreport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sos/sosreport.py b/sos/sosreport.py index 5b3155bd..45103ec9 100755 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -209,7 +209,7 @@ def parse_options(opts): def textcolor(text, color, raw=0): """ Terminal text coloring function """ - if GlobalVars.__cmdLineOpts__.nocolors or not os.isatty(1): + if GlobalVars.__cmdLineOpts__.nocolors or not sys.stdout.isatty(): return text colors = { "black":"30", "red":"31", "green":"32", "brown":"33", "blue":"34", "purple":"35", "cyan":"36", "lgray":"37", "gray":"1;30", "lred":"1;31", -- cgit