aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-08-11 14:36:34 -0700
committerZac Medico <zmedico@gentoo.org>2012-08-11 14:36:34 -0700
commit7c6b4d5155832f1370ce375056105c9b2693afd3 (patch)
tree54eb8a76490210465b29ab05d55daf74d144d2c7
parentinstallsources: fix file permissions, bug #430962 (diff)
downloadportage-7c6b4d5155832f1370ce375056105c9b2693afd3.tar.gz
portage-7c6b4d5155832f1370ce375056105c9b2693afd3.tar.bz2
portage-7c6b4d5155832f1370ce375056105c9b2693afd3.zip
emaint: cleanup TaskHandler isatty logic
-rw-r--r--pym/portage/emaint/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/emaint/main.py b/pym/portage/emaint/main.py
index dbc5f18cc..5775ce118 100644
--- a/pym/portage/emaint/main.py
+++ b/pym/portage/emaint/main.py
@@ -115,7 +115,7 @@ class TaskHandler(object):
return
for task in tasks:
inst = task()
- show_progress = self.show_progress_bar
+ show_progress = self.show_progress_bar and self.isatty
# check if the function is capable of progressbar
# and possibly override it off
if show_progress and hasattr(inst, 'can_progressbar'):
@@ -133,7 +133,7 @@ class TaskHandler(object):
'options': options.copy()
}
result = getattr(inst, func)(**kwargs)
- if self.isatty and show_progress:
+ if show_progress:
# make sure the final progress is displayed
self.progress_bar.display()
print()