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.2.0_alpha27~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bb320d635acb8d745dedf979075331277253167e;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 b9c308bca..6de3d1430 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -5866,10 +5866,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):