From 9f14ffaace0061891d7a1e74348c747a94e68885 Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Thu, 22 Sep 2005 21:50:06 +0000 Subject: [PATCH] Fix NOCOLOR to always be honored Bug #98634, enabled no-pipe option svn path=/; revision=240 --- trunk/src/equery/equery | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery index 23ca6e3..69b6d76 100755 --- a/trunk/src/equery/equery +++ b/trunk/src/equery/equery @@ -1517,10 +1517,7 @@ def configure(): # Guess colour output if (Config["color"] == -1 and \ - ((not sys.stdout.isatty()) or \ - (gentoolkit.settings["NOCOLOR"] in ["yes","true"]))) \ - or \ - Config["color"] == 0: + ((not sys.stdout.isatty()) or (gentoolkit.settings["NOCOLOR"] in ["yes","true"]))): pp.output.nocolor() # Guess piping output @@ -1557,6 +1554,7 @@ def parseArgs(args): sys.exit(0) elif x in ["-C", "--nocolor"]: Config["color"] = 0 + pp.output.nocolor() elif x in ["-N", "--no-pipe"]: Config["piping"] = False elif x in ["-q","--quiet"]: @@ -1575,8 +1573,8 @@ def parseArgs(args): return (command, local_opts) if __name__ == "__main__": - (cmd, local_opts) = parseArgs(sys.argv[1:]) configure() + (cmd, local_opts) = parseArgs(sys.argv[1:]) if cmd: try: cmd.perform(local_opts) -- 2.26.2