shell_command: only log stderr if output was returned
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
4c914d7b4d
commit
db13827a48
|
@ -121,7 +121,7 @@ class ShellCommand:
|
|||
self.proc.terminate()
|
||||
else:
|
||||
complete = not self.cancelled
|
||||
if self.log_stderr:
|
||||
if self.log_stderr and stderr:
|
||||
logging.info(f"{self.program}: {stderr.decode()}")
|
||||
if self._check_proc_success(complete, quiet):
|
||||
return stdout.decode().rstrip("\n")
|
||||
|
|
Loading…
Reference in New Issue