From 4e0d577fa49a6ffb3979a9370b5bf4126193ffc6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 1 Apr 2013 08:33:55 -0700 Subject: [PATCH] egencache,emirrordist: disable color if no tty --- bin/egencache | 4 ++++ pym/portage/_emirrordist/main.py | 3 +++ 2 files changed, 7 insertions(+) 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: -- 2.26.2