ProgressIndicator: flush the output file or it won't work correctly via ssh

likely due to buffering, the progress indication was not visible.
This commit is contained in:
Thomas Waldmann 2015-12-12 17:24:40 +01:00
parent eab60cce99
commit f59db03c60
1 changed files with 2 additions and 1 deletions

View File

@ -912,7 +912,8 @@ class ProgressIndicatorPercent:
return self.output(pct)
def output(self, percent):
print(self.msg % percent, file=self.file, end='\r' if self.same_line else '\n')
print(self.msg % percent, file=self.file, end='\r' if self.same_line else '\n') # python 3.3 gives us flush=True
self.file.flush()
def finish(self):
if self.same_line: