In JobStatusDisplay, always flush the output stream after writing to it.
authorZac Medico <zmedico@gentoo.org>
Fri, 21 Nov 2008 08:23:33 +0000 (08:23 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 21 Nov 2008 08:23:33 +0000 (08:23 -0000)
svn path=/main/trunk/; revision=12014

pym/_emerge/__init__.py

index 4a78b54f19ceed94c2d6735104cffc28c187167e..72f48a31a9e110cf0583a3c8bf5d31f250234dbc 100644 (file)
@@ -8901,10 +8901,12 @@ class JobStatusDisplay(object):
                self.out.write(
                        self._term_codes['carriage_return'] + \
                        self._term_codes['clr_eol'])
+               self.out.flush()
                self._displayed = False
 
        def _display(self, line):
                self.out.write(line)
+               self.out.flush()
                self._displayed = True
 
        def _update(self, msg):
@@ -8912,6 +8914,7 @@ class JobStatusDisplay(object):
                out = self.out
                if not self._isatty:
                        out.write(self._format_msg(msg) + self._term_codes['newline'])
+                       self.out.flush()
                        self._displayed = True
                        return
 
@@ -8943,6 +8946,7 @@ class JobStatusDisplay(object):
 
                if self._displayed:
                        self.out.write(self._term_codes['newline'])
+                       self.out.flush()
                        self._displayed = False
 
        def __setattr__(self, name, value):