From a50e2b634dded6c7c6736a7ca858c16eebbb6005 Mon Sep 17 00:00:00 2001 From: UuuNyaa Date: Thu, 29 Dec 2022 16:10:13 -0800 Subject: [PATCH] Fixe problem in Windows --- motion_generate_tools/executors.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/motion_generate_tools/executors.py b/motion_generate_tools/executors.py index b1b7eed..70e1b93 100644 --- a/motion_generate_tools/executors.py +++ b/motion_generate_tools/executors.py @@ -90,9 +90,10 @@ def _enqueue_output(): input_text_io = self._process.stdout buffer: bytearray - for buffer in iter(input_text_io.readline, b''): - text = buffer.decode(encoding).rstrip() - _invoke_callback(line_callback, text) + while self._process.poll() is None: + for buffer in iter(input_text_io.readline, b''): + text = buffer.decode(encoding).rstrip() + _invoke_callback(line_callback, text) input_text_io.close() self._exit_code = self._process.poll()