mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #25826 from alprs/fix-onchanges_type_check
Check that "onchanges" is a list
This commit is contained in:
commit
98b324c5f8
1 changed files with 2 additions and 2 deletions
|
@ -360,7 +360,7 @@ class Compiler(object):
|
|||
# Add the requires to the reqs dict and check them
|
||||
# all for recursive requisites.
|
||||
argfirst = next(iter(arg))
|
||||
if argfirst in ('require', 'watch', 'prereq'):
|
||||
if argfirst in ('require', 'watch', 'prereq', 'onchanges'):
|
||||
if not isinstance(arg[argfirst], list):
|
||||
errors.append(('The {0}'
|
||||
' statement in state {1!r} in SLS {2!r} '
|
||||
|
@ -965,7 +965,7 @@ class State(object):
|
|||
'formed as a list'
|
||||
.format(name, body['__sls__'])
|
||||
)
|
||||
if argfirst in ('require', 'watch', 'prereq'):
|
||||
if argfirst in ('require', 'watch', 'prereq', 'onchanges'):
|
||||
if not isinstance(arg[argfirst], list):
|
||||
errors.append(
|
||||
'The {0} statement in state {1!r} in '
|
||||
|
|
Loading…
Add table
Reference in a new issue