Skip to content

Commit

Permalink
Remove function_definition format deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
github-abcde committed Jan 3, 2020
1 parent f4fb1aa commit 4f4c562
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions salt/utils/mine.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ def parse_function_definition(function_definition):
Helper function to parse the mine_function definition as provided in config,
or pillar.
:param function_definition: The function definition to parse. Note that the
dict format is deprecated in favor of the list-format used in module.run.
:param function_definition: The function definition to parse.
:type function_definition: list or dict
:rtype: tuple
Expand All @@ -98,23 +97,13 @@ def parse_function_definition(function_definition):
function_kwargs = {}
minion_acl = {}
if isinstance(function_definition, dict):
salt.utils.versions.warn_until(
'Aluminium',
'The dictionary format for specifying mine functions has been '
'deprecated in favor of the format also used by module.run.'
)
# dictionary format for specifying mine function
function_name = function_definition.pop('mine_function', None)
function_kwargs = function_definition
elif isinstance(function_definition, list):
for item in function_definition:
if isinstance(item, dict):
if len(item) > 1:
salt.utils.versions.warn_until(
'Aluminium',
'Specifying multiple kwargs in a single list item '
'has been deprecated in favor of the format also used '
'in module.run.'
)
# if len(item) > 1: # Multiple kwargs in a single list item
function_kwargs.update(item)
else:
function_args.append(item)
Expand Down

0 comments on commit 4f4c562

Please sign in to comment.