Flush the log file.

This is to avoid mangling between the kiwix-build log (env variables, ...)
and the command log.
This commit is contained in:
Matthieu Gautier 2019-06-14 11:39:19 +02:00
parent 4868128551
commit 4810b0240c
1 changed files with 2 additions and 0 deletions

View File

@ -245,6 +245,8 @@ def run_command(command, cwd, context, buildEnv=None, env=None, input=None, cros
for k, v in env.items():
print(" {} : {!r}".format(k, v), file=log)
if log:
log.flush()
kwargs = dict()
if input:
kwargs['stdin'] = subprocess.PIPE