From b4ef1e6be09e5033e165ab1cfe062d23b00f0254 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 11 Jan 2010 05:22:43 +0000 Subject: Bug #300388 - Fix terminal handling code to so term codes aren't sent when TERM=dumb. svn path=/main/trunk/; revision=15191 --- pym/_emerge/JobStatusDisplay.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pym/_emerge/JobStatusDisplay.py') diff --git a/pym/_emerge/JobStatusDisplay.py b/pym/_emerge/JobStatusDisplay.py index dfc766d26..83603ed87 100644 --- a/pym/_emerge/JobStatusDisplay.py +++ b/pym/_emerge/JobStatusDisplay.py @@ -55,7 +55,9 @@ class JobStatusDisplay(object): object.__setattr__(self, "_jobs_column_width", width - 32) self.reset() - isatty = hasattr(self.out, "isatty") and self.out.isatty() + isatty = os.environ.get('TERM') != 'dumb' and \ + hasattr(self.out, 'isatty') and \ + self.out.isatty() object.__setattr__(self, "_isatty", isatty) if not isatty or not self._init_term(): term_codes = {} -- cgit v1.2.3-1-g7c22