summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-27 12:48:22 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-27 12:48:22 +0000
commitd72b782a6017233ed3028df8034e9eff3fa2fcad (patch)
tree42c4339cd42eeacdf60667795b1cd6d491704cfc
parent99e5a83582eff3900cb74fec86a1abd12ef96bad (diff)
downloadportage-d72b782a6017233ed3028df8034e9eff3fa2fcad.tar.gz
portage-d72b782a6017233ed3028df8034e9eff3fa2fcad.tar.bz2
portage-d72b782a6017233ed3028df8034e9eff3fa2fcad.zip
Fix an UnboundLocalError when there's no tty.
svn path=/main/trunk/; revision=6641
-rwxr-xr-xbin/emaint3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/emaint b/bin/emaint
index 0628db371..e07f5a458 100755
--- a/bin/emaint
+++ b/bin/emaint
@@ -217,6 +217,7 @@ def emaint_main(myargv):
if isatty:
progressBar = portage.output.TermProgressBar()
progressHandler = ProgressHandler()
+ onProgress = progressHandler.progressHandler
def display():
progressBar.set(progressHandler.curval, progressHandler.maxval)
progressHandler.display = display
@@ -224,7 +225,7 @@ def emaint_main(myargv):
lines, progressBar.term_columns = \
portage.output.get_term_size()
signal.signal(signal.SIGWINCH, sigwinch_handler)
- result = getattr(inst, func)(onProgress=progressHandler.onProgress)
+ result = getattr(inst, func)(onProgress=onProgress)
if isatty:
# make sure the final progress is displayed
progressHandler.display()