Skip to content

Commit

Permalink
Only handle the scenario when check_cmd is not a function parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgreenaway committed Mar 27, 2023
1 parent 01e7fb1 commit 74b247b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions salt/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -2382,9 +2382,7 @@ def call(self, low, chunks=None, running=None, retries=1):
if state_check_cmd not in self.states:
ret.update(self._run_check_cmd(low))
else:
if "check_cmd" in state_func_sig.parameters:
ret.update(self.states[state_check_cmd](low))
else:
if "check_cmd" not in state_func_sig.parameters:
ret.update(self._run_check_cmd(low))
except Exception as exc: # pylint: disable=broad-except
log.debug(
Expand Down

0 comments on commit 74b247b

Please sign in to comment.