mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-24 09:13:37 +02:00
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:
parent
51054aced1
commit
5ea6ab0383
1 changed files with 2 additions and 0 deletions
|
|
@ -64,6 +64,8 @@ class SSHClient(ExecContext):
|
||||||
def __log_block(prio: int, title: str, block: str):
|
def __log_block(prio: int, title: str, block: str):
|
||||||
if self.__caps & self.Caps.LogOutput:
|
if self.__caps & self.Caps.LogOutput:
|
||||||
return
|
return
|
||||||
|
if not block:
|
||||||
|
return
|
||||||
encoding = sys.stdout.encoding or 'utf-8'
|
encoding = sys.stdout.encoding or 'utf-8'
|
||||||
block = block.decode(encoding).strip()
|
block = block.decode(encoding).strip()
|
||||||
if not block:
|
if not block:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue