Skip to content

Commit

Permalink
Suppress error output for missing variables
Browse files Browse the repository at this point in the history
This condition is expected and handled by the code, so there is no
need to write error logs when it happens.
  • Loading branch information
amendlik committed Jun 21, 2024
1 parent fc65161 commit da607c6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions salt/modules/sysrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ def get(**kwargs):
else:
cmd += " -a"

sysrcs = __salt__["cmd.run"](cmd)
sysrcs = __salt__["cmd.run"](cmd=cmd, output_loglevel="quiet")
if "sysrc: unknown variable" in sysrcs:
# raise CommandExecutionError(sysrcs)
return None

ret = {}
Expand Down

0 comments on commit da607c6

Please sign in to comment.