From: Zac Medico Date: Mon, 1 Apr 2013 15:33:55 +0000 (-0700) Subject: egencache,emirrordist: disable color if no tty X-Git-Tag: v2.2.0_alpha171~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4e0d577fa49a6ffb3979a9370b5bf4126193ffc6;p=portage.git egencache,emirrordist: disable color if no tty --- diff --git a/bin/egencache b/bin/egencache index 797105c43..cbc4b28ad 100755 --- a/bin/egencache +++ b/bin/egencache @@ -844,6 +844,10 @@ class GenChangeLogs(object): self.generate_changelog(cp) def egencache_main(args): + + if not sys.stdout.isatty(): + portage.output.nocolor() + parser, options, atoms = parse_args(args) config_root = options.config_root diff --git a/pym/portage/_emirrordist/main.py b/pym/portage/_emirrordist/main.py index da9f3f327..b94bff00b 100644 --- a/pym/portage/_emirrordist/main.py +++ b/pym/portage/_emirrordist/main.py @@ -224,6 +224,9 @@ def parse_args(args): def emirrordist_main(args): + if not sys.stdout.isatty(): + portage.output.nocolor() + parser, options, args = parse_args(args) if options.version: