In JobStatusDisplay, always flush the output stream after writing to it.
authorZac Medico <zmedico@gentoo.org>
Fri, 21 Nov 2008 08:24:22 +0000 (08:24 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 21 Nov 2008 08:24:22 +0000 (08:24 -0000)
(trunk r12014)

svn path=/main/branches/2.1.6/; revision=12015

pym/_emerge/__init__.py

index acbabf317db771add2d55f6d53b9c62c9463bdc9..689dffa2ffac585c3d4c9dc6f3e0a73c092ef25f 100644 (file)
@@ -8885,10 +8885,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):
@@ -8896,6 +8898,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
 
@@ -8927,6 +8930,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):