diff options
author | Zac Medico <zmedico@gentoo.org> | 2016-07-02 23:27:43 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2016-07-02 23:29:17 -0700 |
commit | a6b0f09806845ba305eb1a39b90ff8752552c9df (patch) | |
tree | 0aac8573984969b0e7e3c95d061cc3588ae532f2 | |
parent | eshowkw: use portage.root for prefix support (diff) | |
download | gentoolkit-a6b0f098.tar.gz gentoolkit-a6b0f098.tar.bz2 gentoolkit-a6b0f098.zip |
eclean: fix DeprecationWarning: Passing nonexistent key 'NOCOLOR'
-rw-r--r-- | pym/gentoolkit/eclean/cli.py | 4 |
1 files 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() |