mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-09 09:49:09 -07:00
Fix dangerous default args. (#29839)
This commit is contained in:
parent
5caa47feb9
commit
68aeaa58a8
50 changed files with 253 additions and 87 deletions
|
@ -639,8 +639,10 @@ def child_to_element(module, child, in_type):
|
|||
module.fail_json(msg="Invalid child input type: %s. Type must be either xml or yaml." % in_type)
|
||||
|
||||
|
||||
def children_to_nodes(module=None, children=[], type='yaml'):
|
||||
def children_to_nodes(module=None, children=None, type='yaml'):
|
||||
"""turn a str/hash/list of str&hash into a list of elements"""
|
||||
children = [] if children is None else children
|
||||
|
||||
return [child_to_element(module, child, type) for child in children]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue