Make xterm titles work even when color is disabled. Thanks to Joachim Kaeber <joachi...
authorZac Medico <zmedico@gentoo.org>
Mon, 12 Feb 2007 07:13:27 +0000 (07:13 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 12 Feb 2007 07:13:27 +0000 (07:13 -0000)
svn path=/main/branches/2.1.2/; revision=5958

pym/output.py

index 62ec975fef2a2c308d00387684913eb7872e2ccc..660f06999366cb1e73630320881bfbb28f1ccec5 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: