mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fix dangerous default args. (#29839)
This commit is contained in:
@@ -169,8 +169,9 @@ class CollinsInventory(object):
|
||||
print(data_to_print)
|
||||
return successful
|
||||
|
||||
def find_assets(self, attributes={}, operation='AND'):
|
||||
def find_assets(self, attributes=None, operation='AND'):
|
||||
""" Obtains Collins assets matching the provided attributes. """
|
||||
attributes = {} if attributes is None else attributes
|
||||
|
||||
# Formats asset search query to locate assets matching attributes, using
|
||||
# the CQL search feature as described here:
|
||||
|
||||
@@ -53,7 +53,9 @@ class ProxmoxVM(dict):
|
||||
|
||||
|
||||
class ProxmoxVMList(list):
|
||||
def __init__(self, data=[]):
|
||||
def __init__(self, data=None):
|
||||
data = [] if data is None else data
|
||||
|
||||
for item in data:
|
||||
self.append(ProxmoxVM(item))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user