diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-01-29 18:47:51 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-01-29 18:47:51 +0000 |
commit | a10c9473d2f46ffa1a98f5a915af09311787a224 (patch) | |
tree | fa2701775e776d48e55ba8d9669ca0a4b70a1ee4 /pym/_emerge/JobStatusDisplay.py | |
parent | 942c2f3736f4babf7d0ad9c291a8b4252622f13b (diff) | |
download | portage-a10c9473d2f46ffa1a98f5a915af09311787a224.tar.gz portage-a10c9473d2f46ffa1a98f5a915af09311787a224.tar.bz2 portage-a10c9473d2f46ffa1a98f5a915af09311787a224.zip |
Bug #300388 - Fix terminal handling code to so term codes aren't sent when
TERM=dumb. (trunk r15191)
svn path=/main/branches/2.1.7/; revision=15246
Diffstat (limited to 'pym/_emerge/JobStatusDisplay.py')
-rw-r--r-- | pym/_emerge/JobStatusDisplay.py | 4 |
1 files changed, 3 insertions, 1 deletions
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 = {} |