cli/vms/create: fix trailing newlines in log output
All checks were successful
checks-impure / test (pull_request) Successful in 1m0s
checks / test (pull_request) Successful in 2m17s

This commit is contained in:
Jörg Thalheim 2023-10-27 14:27:52 +02:00
parent ba50ce45f1
commit 3e4ad8ae1b

View File

@ -68,10 +68,10 @@ class Command:
try:
for line in fd:
if fd == self.p.stderr:
print(f"[{cmd[0]}] stderr: {line}")
print(f"[{cmd[0]}] stderr: {line.rstrip()}")
self.stderr.append(line)
else:
print(f"[{cmd[0]}] stdout: {line}")
print(f"[{cmd[0]}] stdout: {line.rstrip()}")
self.stdout.append(line)
self._output.put(line)
except BlockingIOError: