From: Zac Medico Date: Wed, 2 Mar 2011 16:39:14 +0000 (-0800) Subject: depgraph: don't output \b to non-tty X-Git-Tag: v2.1.9.43~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7cedfe64542cb8ead75c003a916cb88ac4bb523b;p=portage.git depgraph: don't output \b to non-tty This will fix bug #357093. --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index a755116ce..f17a93ccb 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -5772,10 +5772,15 @@ def _spinner_start(spinner, myopts): def _spinner_stop(spinner): if spinner is None or \ - spinner.update is spinner.update_quiet: + spinner.update == spinner.update_quiet: return - portage.writemsg_stdout("\b\b... done!\n") + if spinner.update != spinner.update_basic: + # update_basic is used for non-tty output, + # so don't output backspaces in that case. + portage.writemsg_stdout("\b\b") + + portage.writemsg_stdout("... done!\n") def backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, spinner):