If the TERM environment variable is unset then just use internal default
authorZac Medico <zmedico@gentoo.org>
Thu, 24 Dec 2009 04:02:13 +0000 (04:02 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 24 Dec 2009 04:02:13 +0000 (04:02 -0000)
term codes since the vt100 codes typically produce strange output. This
fixes strange output from catalyst stage1 builds. (trunk r15129)

svn path=/main/branches/2.1.7/; revision=15141

pym/_emerge/JobStatusDisplay.py

index 288e355f694bda3b184d06e0694592561f188a0c..cfc0bfa91ce6419f067741ce15ff5fc002616403 100644 (file)
@@ -87,7 +87,9 @@ class JobStatusDisplay(object):
                        False otherwise.
                """
 
-               term_type = os.environ.get("TERM", "vt100")
+               term_type = os.environ.get("TERM", "").strip()
+               if not term_type:
+                       return False
                tigetstr = None
 
                try: