summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/JobStatusDisplay.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-01-11 05:22:43 +0000
committerZac Medico <zmedico@gentoo.org>2010-01-11 05:22:43 +0000
commitb4ef1e6be09e5033e165ab1cfe062d23b00f0254 (patch)
tree5563e73c5005ddd91f25bebfb6c510ebeabd4de4 /pym/_emerge/JobStatusDisplay.py
parent3dbfec2d8a087d242983ef40ef37ad6ed9b77913 (diff)
downloadportage-b4ef1e6be09e5033e165ab1cfe062d23b00f0254.tar.gz
portage-b4ef1e6be09e5033e165ab1cfe062d23b00f0254.tar.bz2
portage-b4ef1e6be09e5033e165ab1cfe062d23b00f0254.zip
Bug #300388 - Fix terminal handling code to so term codes aren't sent when
TERM=dumb. svn path=/main/trunk/; revision=15191
Diffstat (limited to 'pym/_emerge/JobStatusDisplay.py')
-rw-r--r--pym/_emerge/JobStatusDisplay.py4
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 = {}