summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-01-11 04:44:09 +0000
committerZac Medico <zmedico@gentoo.org>2010-01-11 04:44:09 +0000
commit3dbfec2d8a087d242983ef40ef37ad6ed9b77913 (patch)
treefad07a03f47bbf3f8e829b344f4e3d8944881246
parent8df88d77d361e4e4f82f8ebea4ffcde8791ea72f (diff)
downloadportage-3dbfec2d8a087d242983ef40ef37ad6ed9b77913.tar.gz
portage-3dbfec2d8a087d242983ef40ef37ad6ed9b77913.tar.bz2
portage-3dbfec2d8a087d242983ef40ef37ad6ed9b77913.zip
Tweak TERM usage in xtermTitleReset() to match that in xtermTitle().
svn path=/main/trunk/; revision=15190
-rw-r--r--pym/portage/output.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage/output.py b/pym/portage/output.py
index a4ca3a306..3fbb0c992 100644
--- a/pym/portage/output.py
+++ b/pym/portage/output.py
@@ -270,7 +270,10 @@ def xtermTitleReset():
if prompt_command == "":
default_xterm_title = ""
elif prompt_command is not None:
- if dotitles and "TERM" in os.environ and sys.stderr.isatty():
+ if dotitles and \
+ 'TERM' in os.environ and \
+ _legal_terms_re.match(os.environ['TERM']) is not None and \
+ sys.stderr.isatty():
from portage.process import find_binary, spawn
shell = os.environ.get("SHELL")
if not shell or not os.access(shell, os.EX_OK):