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 8da445b9f4
commit fba2cc9fa6

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