From a6b0f09806845ba305eb1a39b90ff8752552c9df Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 2 Jul 2016 23:27:43 -0700 Subject: eclean: fix DeprecationWarning: Passing nonexistent key 'NOCOLOR' --- pym/gentoolkit/eclean/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/gentoolkit/eclean/cli.py b/pym/gentoolkit/eclean/cli.py index aa9af3f..d8c5bd2 100644 --- a/pym/gentoolkit/eclean/cli.py +++ b/pym/gentoolkit/eclean/cli.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright 2003-2010 Gentoo Foundation +# Copyright 2003-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 @@ -448,7 +448,7 @@ def main(): """Parse command line and execute all actions.""" # set default options options = {} - options['nocolor'] = (port_settings["NOCOLOR"] in ('yes','true') + options['nocolor'] = (port_settings.get("NOCOLOR") in ('yes','true') or not sys.stdout.isatty()) if options['nocolor']: pp.output.nocolor() -- cgit v1.2.3-65-gdbad