summaryrefslogtreecommitdiffstats
path: root/pym/output.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-09-29 02:10:29 +0000
committerZac Medico <zmedico@gentoo.org>2006-09-29 02:10:29 +0000
commit297fc758739af448b7531db22159d1f057caacc4 (patch)
tree779fb630bb79058e7490d5e2dd91349f5ebc779c /pym/output.py
parent01055e6e5fe9c5fc3539acb56706e2b49601266d (diff)
downloadportage-297fc758739af448b7531db22159d1f057caacc4.tar.gz
portage-297fc758739af448b7531db22159d1f057caacc4.tar.bz2
portage-297fc758739af448b7531db22159d1f057caacc4.zip
Call sys.stdout.flush() after print statements so that output has the correct order when multiple processes output to a shared pipe.
svn path=/main/trunk/; revision=4554
Diffstat (limited to 'pym/output.py')
-rw-r--r--pym/output.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/output.py b/pym/output.py
index f9d4fccb0..63f24fc22 100644
--- a/pym/output.py
+++ b/pym/output.py
@@ -285,6 +285,7 @@ class EOutput:
if self.__last_e_cmd != "ebegin":
self.__last_e_len = 0
print "%*s%s" % ((self.term_columns - self.__last_e_len - 6), "", status_brackets)
+ sys.stdout.flush()
def ebegin(self, msg):
"""
@@ -326,6 +327,7 @@ class EOutput:
if not self.quiet:
if self.__last_e_cmd == "ebegin": print
print colorize("BAD", " * ") + msg
+ sys.stdout.flush()
self.__last_e_cmd = "eerror"
def einfo(self, msg):
@@ -338,6 +340,7 @@ class EOutput:
if not self.quiet:
if self.__last_e_cmd == "ebegin": print
print colorize("GOOD", " * ") + msg
+ sys.stdout.flush()
self.__last_e_cmd = "einfo"
def einfon(self, msg):
@@ -350,6 +353,7 @@ class EOutput:
if not self.quiet:
if self.__last_e_cmd == "ebegin": print
print colorize("GOOD", " * ") + msg ,
+ sys.stdout.flush()
self.__last_e_cmd = "einfon"
def ewarn(self, msg):
@@ -362,6 +366,7 @@ class EOutput:
if not self.quiet:
if self.__last_e_cmd == "ebegin": print
print colorize("WARN", " * ") + msg
+ sys.stdout.flush()
self.__last_e_cmd = "ewarn"
def ewend(self, errno, *msg):