TERM=dumb.
svn path=/main/trunk/; revision=15191
if not opts.color == 'y' and \
(opts.color == 'n' or \
portage.settings.get('NOCOLOR') in ('yes', 'true') or \
+ portage.settings.get('TERM') == 'dumb' or \
not sys.stdout.isatty()):
portage.output.nocolor()
portage.settings.unlock()
status = "Attempting to fix %s"
func = "fix"
- isatty = sys.stdout.isatty()
+ isatty = os.environ.get('TERM') != 'dumb' and sys.stdout.isatty()
for task in tasks:
print(status % task.name())
inst = task()
repoman_settings.lock()
if repoman_settings.get("NOCOLOR", "").lower() in ("yes", "true") or \
+ repoman_settings.get('TERM') == 'dumb' or \
not sys.stdout.isatty():
nocolor()
object.__setattr__(self, "_jobs_column_width", width - 32)
self.reset()
- isatty = hasattr(self.out, "isatty") and self.out.isatty()
+ isatty = os.environ.get('TERM') != 'dumb' and \
+ hasattr(self.out, 'isatty') and \
+ self.out.isatty()
object.__setattr__(self, "_isatty", isatty)
if not isatty or not self._init_term():
term_codes = {}
porttrees = [tree_data.path for tree_data in porttrees_data]
- isatty = sys.stdout.isatty()
- quiet = not isatty or '--quiet' in myopts
+ quiet = settings.get('TERM') == 'dumb' or \
+ '--quiet' in myopts or \
+ not sys.stdout.isatty()
+
onProgress = None
if not quiet:
progressBar = portage.output.TermProgressBar()
portage.output.havecolor = 0
settings["NOCOLOR"] = "true"
settings.backup_changes("NOCOLOR")
- elif not sys.stdout.isatty() and settings.get("NOCOLOR") != "no":
+ elif settings.get('TERM') == 'dumb' or \
+ not sys.stdout.isatty():
portage.output.havecolor = 0
settings["NOCOLOR"] = "true"
settings.backup_changes("NOCOLOR")
portage.debug.set_trace(True)
if not ("--quiet" in myopts):
- if not sys.stdout.isatty() or ("--nospinner" in myopts):
+ if '--nospinner' in myopts or \
+ settings.get('TERM') == 'dumb' or \
+ not sys.stdout.isatty():
spinner.update = spinner.update_basic
if myaction == 'version':
self.out.flush()
cache_stats = CacheStats(out)
- have_tty = out.isatty()
+ have_tty = os.environ.get('TERM') != 'dumb' and out.isatty()
if have_tty:
cache_stats.display()
binpkg_filenames = set()