mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #24382 from basepi/grainscommandnotfound23342
[2015.5] Handle CommandExecutionError in grains commands, Fixes #23342
This commit is contained in:
commit
b3fa8fefcb
1 changed files with 9 additions and 2 deletions
|
@ -497,9 +497,16 @@ def _virtual(osdata):
|
|||
|
||||
cmd = '{0} {1}'.format(command, ' '.join(args))
|
||||
|
||||
ret = __salt__['cmd.run_all'](cmd)
|
||||
try:
|
||||
ret = __salt__['cmd.run_all'](cmd)
|
||||
|
||||
if ret['retcode'] > 0:
|
||||
if ret['retcode'] > 0:
|
||||
if salt.log.is_logging_configured():
|
||||
if salt.utils.is_windows():
|
||||
continue
|
||||
failed_commands.add(command)
|
||||
continue
|
||||
except salt.exceptions.CommandExecutionError:
|
||||
if salt.log.is_logging_configured():
|
||||
if salt.utils.is_windows():
|
||||
continue
|
||||
|
|
Loading…
Add table
Reference in a new issue