From 37918d9816a4b143dc456f9256bc404f3bc8cc8d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 29 Oct 2017 23:58:54 +0100 Subject: [PATCH] [fix] Go to sleep Alex, you drunk --- moulinette/utils/process.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moulinette/utils/process.py b/moulinette/utils/process.py index 74c56c65..dda91843 100644 --- a/moulinette/utils/process.py +++ b/moulinette/utils/process.py @@ -93,12 +93,12 @@ def call_async_output(args, callback, **kwargs): if stdinfo: stdinfo_f = open(stdinfo, "r") stdinfo_reader, stdinfo_consum = async_file_reading(stdinfo_f, callback[2]) - while not stdinfo_reader.eof() and not stdinfo_reader.eof(): + while not stdout_reader.eof() or not stderr_reader.eof() or not stdinfo_reader.eof(): time.sleep(.1) stdinfo_reader.join() stdinfo_consum.join() - while not stdout_reader.eof() and not stderr_reader.eof(): + while not stdout_reader.eof() or not stderr_reader.eof(): time.sleep(.1) stderr_reader.join() stderr_consum.join()