diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-01-11 05:22:43 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-01-11 05:22:43 +0000 |
commit | b4ef1e6be09e5033e165ab1cfe062d23b00f0254 (patch) | |
tree | 5563e73c5005ddd91f25bebfb6c510ebeabd4de4 /bin | |
parent | 3dbfec2d8a087d242983ef40ef37ad6ed9b77913 (diff) | |
download | portage-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-x | bin/ebuild | 1 | ||||
-rwxr-xr-x | bin/emaint | 2 | ||||
-rwxr-xr-x | bin/repoman | 1 |
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() |