aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2012-07-09 17:04:58 -0700
committerZac Medico <zmedico@gentoo.org>2012-07-09 17:11:02 -0700
commit0177e7d1aa9267897032d7a4c7de9c6968c5072d (patch)
tree70f9e957cdcc29fce026dfa72b6dd19480af7ee0 /bin
parentfix a couple more inconsistancies in the progessbar title, label changes. (diff)
downloadportage-0177e7d1aa9267897032d7a4c7de9c6968c5072d.tar.gz
portage-0177e7d1aa9267897032d7a4c7de9c6968c5072d.tar.bz2
portage-0177e7d1aa9267897032d7a4c7de9c6968c5072d.zip
migrate emaint to use the new title and label features of the progressbar.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emaint6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/emaint b/bin/emaint
index cf2ccb8ec..5f54f6af5 100755
--- a/bin/emaint
+++ b/bin/emaint
@@ -610,19 +610,16 @@ def emaint_main(myargv):
if action == "-c/--check":
- status = "Checking %s for problems"
func = "check"
else:
- status = "Attempting to fix %s"
func = "fix"
isatty = os.environ.get('TERM') != 'dumb' and sys.stdout.isatty()
for task in tasks:
- print(status % task.name())
inst = task()
onProgress = None
if isatty:
- progressBar = portage.output.TermProgressBar()
+ progressBar = portage.output.TermProgressBar(title="Emaint", max_desc_length=26)
progressHandler = ProgressHandler()
onProgress = progressHandler.onProgress
def display():
@@ -632,6 +629,7 @@ def emaint_main(myargv):
lines, progressBar.term_columns = \
portage.output.get_term_size()
signal.signal(signal.SIGWINCH, sigwinch_handler)
+ progressBar.label(func + " " + inst.name())
result = getattr(inst, func)(onProgress=onProgress)
if isatty:
# make sure the final progress is displayed