sysrc.get: be more quiet

sysrc.get is frequently used by states like sysrc.absent, where it is
expected that the variable will not be present.  So don't write errors
to the log file.
This commit is contained in:
Alan Somers 2023-05-08 17:43:04 -06:00 committed by Daniel Wozniak
parent cd8cb61196
commit 28a74cb511

View file

@ -49,7 +49,7 @@ def get(**kwargs):
else:
cmd += " -a"
sysrcs = __salt__["cmd.run"](cmd)
sysrcs = __salt__["cmd.run"](cmd, output_loglevel="quiet")
if "sysrc: unknown variable" in sysrcs:
# raise CommandExecutionError(sysrcs)
return None