shell_command: only log stderr if output was returned

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-03-04 21:26:02 -05:00
parent 4c914d7b4d
commit db13827a48
1 changed files with 1 additions and 1 deletions

View File

@ -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")