Fix extra new line that break from progress bar

The new line should be writed to stdout only when there is
a progress bar displayed.

Change-Id: If0e62cd5a3734ed67d66d285267c101b7caeea77
Closes-Bug: #1253042
This commit is contained in:
m.benchchaoui@cloudbau.de
2013-11-20 11:44:40 +01:00
parent c22b88d9b1
commit 2dfbb3f57b
3 changed files with 35 additions and 8 deletions
+7
View File
@@ -110,3 +110,10 @@ class FakeTTYStdout(StringIO.StringIO):
self.seek(0)
data = data[1:]
return StringIO.StringIO.write(self, data)
class FakeNoTTYStdout(FakeTTYStdout):
"""A Fake stdout that is not a TTY device."""
def isatty(self):
return False