task_manager: log stdout/stderr correctly for processes
All checks were successful
checks-impure / test (pull_request) Successful in 18s
checks / test (pull_request) Successful in 1m28s

This commit is contained in:
Jörg Thalheim 2023-10-04 18:14:57 +02:00
parent d156218775
commit d0c1eddf79

View File

@ -49,10 +49,11 @@ class Command:
for fd in rlist:
try:
for line in fd:
self.log.debug("stdout: %s", line)
if fd == self.p.stderr:
self.log.debug(f"[{cmd[0]}] stderr: {line}")
self.stderr.append(line)
else:
self.log.debug(f"[{cmd[0]}] stdout: {line}")
self.stdout.append(line)
self._output.put(line)
except BlockingIOError: