From: Paul Varner Date: Thu, 6 Sep 2012 21:34:19 +0000 (-0500) Subject: Remove check of isatty when guessing color. X-Git-Tag: gentoolkit-0.3.0.7~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e2e77301eb234aecfa5160d0de7bfda7bbe38a64;p=gentoolkit.git Remove check of isatty when guessing color. When going through a pipe, color is already turned off. This allows color to be restored with the --no-pipe option. If color is not desired with --no-pipe, then --nocolor should also be specified. --- diff --git a/pym/gentoolkit/equery/__init__.py b/pym/gentoolkit/equery/__init__.py index a73ef1b..65f3ec1 100644 --- a/pym/gentoolkit/equery/__init__.py +++ b/pym/gentoolkit/equery/__init__.py @@ -215,8 +215,8 @@ def initialize_configuration(): CONFIG['termWidth'] = term_width - 1 # Guess color output - if (CONFIG['color'] == -1 and (not sys.stdout.isatty() or - os.getenv("NOCOLOR") in ("yes", "true")) or CONFIG['color'] == 0): + if (CONFIG['color'] == -1 and os.getenv("NOCOLOR") in ("yes", "true") or + CONFIG['color'] == 0): pp.output.nocolor() if CONFIG['piping']: