mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Use the already existing context
keyword.
This commit is contained in:
parent
26bac77312
commit
6f53c6dbae
@ -772,15 +772,15 @@ def format_call(fun, data, initial_ret=None, expected_extra_kws=()):
|
||||
# Return a warning to the user explaining what's going on
|
||||
ret.setdefault('warnings', []).append(
|
||||
'{0}. If you were trying to pass additional data to be used '
|
||||
'in a template context, please pass a dictionary to '
|
||||
'\'template_context\'. Your approach will work until salt>=0.20.0 '
|
||||
'in a template context, please populate \'context\' with '
|
||||
'\'key: val\' pairs. Your approach will work until salt>=0.20.0 '
|
||||
'is out.{1}'.format(
|
||||
msg,
|
||||
'' if 'full' not in ret else ' Please update your state files.'
|
||||
)
|
||||
)
|
||||
# Lets set the current extra kwargs as kwargs for the template context
|
||||
ret.setdefault('template_context', {}).update(extra)
|
||||
ret.setdefault('context', {}).update(extra)
|
||||
|
||||
return ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user