From: Zac Medico Date: Sun, 27 May 2007 12:48:22 +0000 (-0000) Subject: Fix an UnboundLocalError when there's no tty. X-Git-Tag: v2.2_pre1~1357 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d72b782a6017233ed3028df8034e9eff3fa2fcad;p=portage.git Fix an UnboundLocalError when there's no tty. svn path=/main/trunk/; revision=6641 --- 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()