py3: fix prompt being erased by progress

Summary:
Flushing behavior changed in Python 3 and now we need to flush the
progress bar after clearing it, since clearing it is part of suspending the
progress and we don't want any stored up redraw bytes to wipe out future writes
from the caller.

Reviewed By: quark-zju

Differential Revision: D22579013

fbshipit-source-id: f3afd560e1365696509f56b137cceababcfed794
This commit is contained in:
Durham Goode 2020-07-16 16:25:18 -07:00 committed by Facebook GitHub Bot
parent 282829a49f
commit 43489d91d4

View File

@ -186,6 +186,7 @@ class baserenderer(object):
if not self.printed:
return
self._writeprogress("\r%s\r" % (" " * self.width()))
self._bar._ui.ferr.flush()
def complete(self):
if not self.printed: