mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Fix dangerous default args. (#29839)
This commit is contained in:
@@ -836,8 +836,8 @@ def _find_module_utils(module_name, b_module_data, module_path, module_args, tas
|
||||
return (b_module_data, module_style, shebang)
|
||||
|
||||
|
||||
def modify_module(module_name, module_path, module_args, task_vars=dict(), module_compression='ZIP_STORED', async_timeout=0, become=False,
|
||||
become_method=None, become_user=None, become_password=None, environment=dict()):
|
||||
def modify_module(module_name, module_path, module_args, task_vars=None, module_compression='ZIP_STORED', async_timeout=0, become=False,
|
||||
become_method=None, become_user=None, become_password=None, environment=None):
|
||||
"""
|
||||
Used to insert chunks of code into modules before transfer rather than
|
||||
doing regular python imports. This allows for more efficient transfer in
|
||||
@@ -858,6 +858,9 @@ def modify_module(module_name, module_path, module_args, task_vars=dict(), modul
|
||||
properties not available here.
|
||||
|
||||
"""
|
||||
task_vars = {} if task_vars is None else task_vars
|
||||
environment = {} if environment is None else environment
|
||||
|
||||
with open(module_path, 'rb') as f:
|
||||
|
||||
# read in the module source
|
||||
|
||||
Reference in New Issue
Block a user