aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2022-07-28 08:22:55 -0700
committerBrian Dolbec <dolsen@gentoo.org>2022-07-28 08:22:55 -0700
commit9a402fba0d63240685a2326926060c3c8c523101 (patch)
tree2000fcc26b6b6990944f8fb65d6db8873c89e87e /pym/gentoolkit/equery/__init__.py
parentequery meta: Put maintainer description on the same line (diff)
downloadgentoolkit-9a402fba0d63240685a2326926060c3c8c523101.tar.gz
gentoolkit-9a402fba0d63240685a2326926060c3c8c523101.tar.bz2
gentoolkit-9a402fba0d63240685a2326926060c3c8c523101.zip
equery: Set nocolor for piping to after options are parsed
Fixes commit 84ffe42e5 which set nocolor before options were parsed. Bug: https://bugs.gentoo.org/861116 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
Diffstat (limited to 'pym/gentoolkit/equery/__init__.py')
-rw-r--r--pym/gentoolkit/equery/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/gentoolkit/equery/__init__.py b/pym/gentoolkit/equery/__init__.py
index 56b2caa..ae760c1 100644
--- a/pym/gentoolkit/equery/__init__.py
+++ b/pym/gentoolkit/equery/__init__.py
@@ -228,8 +228,6 @@ def initialize_configuration():
# set extra wide, should disable wrapping unless
# there is some extra long text
CONFIG["termWidth"] = 600
- # turn off color
- pp.output.nocolor()
CONFIG["debug"] = bool(os.getenv("DEBUG", False))
@@ -338,6 +336,10 @@ def main(argv):
else:
CONFIG["verbose"] = True
+ if CONFIG["piping"]:
+ # turn off color
+ pp.output.nocolor()
+
try:
module_name, module_args = split_arguments(args)
except IndexError: