From e2e77301eb234aecfa5160d0de7bfda7bbe38a64 Mon Sep 17 00:00:00 2001 From: Paul Varner Date: Thu, 6 Sep 2012 16:34:19 -0500 Subject: [PATCH] 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. --- pym/gentoolkit/equery/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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']: -- 2.26.2