summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Varner2012-09-06 21:34:19 (GMT)
committerPaul Varner2012-09-06 21:34:19 (GMT)
commite2e77301eb234aecfa5160d0de7bfda7bbe38a64 (patch)
tree77f79c06e8e9d2db6d906f4100e9d8c9043130ff
parent305cc402de2081e1219b4d0457b247ec0fdfb416 (diff)
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.
-rw-r--r--pym/gentoolkit/equery/__init__.py4
1 files 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']: