Commit e2d1214c authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

[Bug #620630] Flush stdout after logging every message. Without it,

   when output is redirected to a file, compiler error messages show
   up before Distutils prints the command being invoked.
parent 33a5edf8
......@@ -9,6 +9,8 @@ WARN = 3
ERROR = 4
FATAL = 5
import sys
class Log:
def __init__(self, threshold=WARN):
......@@ -17,6 +19,7 @@ class Log:
def _log(self, level, msg, args):
if level >= self.threshold:
print msg % args
sys.stdout.flush()
def log(self, level, msg, *args):
self._log(level, msg, args)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment