Skip to content

Commit

Permalink
sysrc.get: be more quiet
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
asomers authored and dwoz committed Dec 16, 2023
1 parent 8da445b commit fba2cc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion salt/modules/sysrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fba2cc9

Please sign in to comment.