aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'portage_with_autodep/pym/portage/elog/mod_echo.py')
-rw-r--r--portage_with_autodep/pym/portage/elog/mod_echo.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/portage_with_autodep/pym/portage/elog/mod_echo.py b/portage_with_autodep/pym/portage/elog/mod_echo.py
index 5de25bf..59117be 100644
--- a/portage_with_autodep/pym/portage/elog/mod_echo.py
+++ b/portage_with_autodep/pym/portage/elog/mod_echo.py
@@ -18,6 +18,19 @@ def process(mysettings, key, logentries, fulltext):
_items.append((mysettings["ROOT"], key, logentries))
def finalize():
+ # For consistency, send all message types to stdout.
+ sys.stdout.flush()
+ sys.stderr.flush()
+ stderr = sys.stderr
+ try:
+ sys.stderr = sys.stdout
+ _finalize()
+ finally:
+ sys.stderr = stderr
+ sys.stdout.flush()
+ sys.stderr.flush()
+
+def _finalize():
global _items
printer = EOutput()
for root, key, logentries in _items: