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()
|
self.proc.terminate()
|
||||||
else:
|
else:
|
||||||
complete = not self.cancelled
|
complete = not self.cancelled
|
||||||
if self.log_stderr:
|
if self.log_stderr and stderr:
|
||||||
logging.info(f"{self.program}: {stderr.decode()}")
|
logging.info(f"{self.program}: {stderr.decode()}")
|
||||||
if self._check_proc_success(complete, quiet):
|
if self._check_proc_success(complete, quiet):
|
||||||
return stdout.decode().rstrip("\n")
|
return stdout.decode().rstrip("\n")
|
||||||
|
|
Loading…
Reference in New Issue