From 5afcd74319164866659bd4278f27723836782695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Wed, 29 Apr 2020 16:52:20 +0200 Subject: [PATCH] bugfix for call_and_return_stdout --- satella/processes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/satella/processes.py b/satella/processes.py index c0dfbd9f..7a0b9a78 100644 --- a/satella/processes.py +++ b/satella/processes.py @@ -27,7 +27,9 @@ def call_and_return_stdout(args: tp.Union[str, tp.List[str]], Everything in kwargs will be passed to subprocess.Popen A bytes object will be returned if encoding is not defined, else stdout will be decoded - according to specified encoding + according to specified encoding. + + #todo every usage of this call will spawn a daemonic thread, pending a fix :param args: arguments to run the program with. If passed a string, it will be split on space. :param timeout: amount of seconds to wait for the process result. If process does not complete @@ -52,7 +54,6 @@ def call_and_return_stdout(args: tp.Union[str, tp.List[str]], except subprocess.TimeoutExpired: proc.kill() proc.wait() - reader_thread.join() if proc.returncode != expected_return_code: raise ProcessFailed(proc.returncode) -- GitLab