summaryrefslogtreecommitdiffstats
path: root/bin
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 /bin
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 'bin')
-rwxr-xr-xbin/ebuild1
-rwxr-xr-xbin/emaint2
-rwxr-xr-xbin/repoman1
3 files changed, 3 insertions, 1 deletions
diff --git a/bin/ebuild b/bin/ebuild
index dc3f448c4..d8eec06a7 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -88,6 +88,7 @@ if debug and "python-trace" in portage.features:
if not opts.color == 'y' and \
(opts.color == 'n' or \
portage.settings.get('NOCOLOR') in ('yes', 'true') or \
+ portage.settings.get('TERM') == 'dumb' or \
not sys.stdout.isatty()):
portage.output.nocolor()
portage.settings.unlock()
diff --git a/bin/emaint b/bin/emaint
index 594ac87cd..461294377 100755
--- a/bin/emaint
+++ b/bin/emaint
@@ -536,7 +536,7 @@ def emaint_main(myargv):
status = "Attempting to fix %s"
func = "fix"
- isatty = sys.stdout.isatty()
+ isatty = os.environ.get('TERM') != 'dumb' and sys.stdout.isatty()
for task in tasks:
print(status % task.name())
inst = task()
diff --git a/bin/repoman b/bin/repoman
index 679dcae61..2a1ef0556 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -96,6 +96,7 @@ repoman_settings = portage.config(local_config=False,
repoman_settings.lock()
if repoman_settings.get("NOCOLOR", "").lower() in ("yes", "true") or \
+ repoman_settings.get('TERM') == 'dumb' or \
not sys.stdout.isatty():
nocolor()