Tweak TERM usage in xtermTitleReset() to match that in xtermTitle().
authorZac Medico <zmedico@gentoo.org>
Mon, 11 Jan 2010 04:44:09 +0000 (04:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 11 Jan 2010 04:44:09 +0000 (04:44 -0000)
svn path=/main/trunk/; revision=15190

pym/portage/output.py

index a4ca3a306b495bdcc3050e48fccacb0937a89ae1..3fbb0c992187c957fc8ee3eef46b8db472693212 100644 (file)
@@ -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):