mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Fix dangerous default args. (#29839)
This commit is contained in:
@@ -120,9 +120,11 @@ class Cli:
|
||||
|
||||
return exec_command(self._module, command)
|
||||
|
||||
def get_config(self, flags=[]):
|
||||
def get_config(self, flags=None):
|
||||
"""Retrieves the current config from the device or cache
|
||||
"""
|
||||
flags = [] if flags is None else flags
|
||||
|
||||
cmd = 'display current-configuration '
|
||||
cmd += ' '.join(flags)
|
||||
cmd = cmd.strip()
|
||||
@@ -227,7 +229,9 @@ def to_command(module, commands):
|
||||
return commands
|
||||
|
||||
|
||||
def get_config(module, flags=[]):
|
||||
def get_config(module, flags=None):
|
||||
flags = [] if flags is None else flags
|
||||
|
||||
conn = get_connection(module)
|
||||
return conn.get_config(flags)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user