fix-35384, fix the logic caused by wrong indent (#35566)

This commit is contained in:
Nicole Thomas 2016-08-18 11:03:24 -06:00 committed by GitHub
parent feb852f8c0
commit 2a5d1a0eee

View file

@ -363,10 +363,10 @@ def mod_run_check(cmd_kwargs, onlyif, unless, group, creates):
for entry in unless:
cmd.append(__salt__['cmd.retcode'](entry, ignore_retcode=True, python_shell=True, **cmd_kwargs))
log.debug('Last command return code: {0}'.format(cmd))
if all([c == 0 for c in cmd]):
return {'comment': 'unless execution succeeded',
'skip_watch': True,
'result': True}
if all([c == 0 for c in cmd]):
return {'comment': 'unless execution succeeded',
'skip_watch': True,
'result': True}
elif not isinstance(unless, string_types):
if unless:
log.debug('Command not run: unless did not evaluate to string_type')