Make xterm titles work even when color is disabled. Thanks to Joachim Kaeber <joachi...
authorZac Medico <zmedico@gentoo.org>
Sat, 10 Feb 2007 22:18:07 +0000 (22:18 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 10 Feb 2007 22:18:07 +0000 (22:18 -0000)
svn path=/main/trunk/; revision=5950

pym/portage/output.py

index 600b8183b5b98c43826196e55ef90b361c722401..0b58c81b67f87a4145c1cbd665fe1a799b73c40d 100644 (file)
@@ -174,7 +174,7 @@ def nc_len(mystr):
        return len(tmp)
 
 def xtermTitle(mystr, raw=False):
-       if havecolor and dotitles and os.environ.has_key("TERM") and sys.stderr.isatty():
+       if dotitles and "TERM" in os.environ and sys.stderr.isatty():
                myt=os.environ["TERM"]
                legal_terms = ["xterm","Eterm","aterm","rxvt","screen","kterm","rxvt-unicode","gnome"]
                for term in legal_terms: