lib.ec.SSHClient._run(): Fix empty stderr output logging

If stderr is None, a bogus Exception is thrown in verbose mode, fix
that.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-04-19 14:34:21 +02:00
commit 5ea6ab0383

View file

@ -64,6 +64,8 @@ class SSHClient(ExecContext):
def __log_block(prio: int, title: str, block: str):
if self.__caps & self.Caps.LogOutput:
return
if not block:
return
encoding = sys.stdout.encoding or 'utf-8'
block = block.decode(encoding).strip()
if not block: