From: Zac Medico Date: Fri, 29 Sep 2006 02:10:29 +0000 (-0000) Subject: Call sys.stdout.flush() after print statements so that output has the correct order... X-Git-Tag: v2.1.2~749 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=297fc758739af448b7531db22159d1f057caacc4;p=portage.git 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 --- 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):