mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Remove mutable default arguments.
This commit is contained in:
parent
10e2fc6f60
commit
744679601f
2 changed files with 6 additions and 2 deletions
|
@ -150,7 +150,9 @@ class AnsibleCloudStack(object):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def _get_by_key(self, key=None, my_dict={}):
|
def _get_by_key(self, key=None, my_dict=None):
|
||||||
|
if my_dict is None:
|
||||||
|
my_dict = {}
|
||||||
if key:
|
if key:
|
||||||
if key in my_dict:
|
if key in my_dict:
|
||||||
return my_dict[key]
|
return my_dict[key]
|
||||||
|
|
|
@ -400,7 +400,9 @@ class RequestWithMethod(urllib2.Request):
|
||||||
Originally contained in library/net_infrastructure/dnsmadeeasy
|
Originally contained in library/net_infrastructure/dnsmadeeasy
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self, url, method, data=None, headers={}):
|
def __init__(self, url, method, data=None, headers=None):
|
||||||
|
if headers is None:
|
||||||
|
headers = {}
|
||||||
self._method = method
|
self._method = method
|
||||||
urllib2.Request.__init__(self, url, data, headers)
|
urllib2.Request.__init__(self, url, data, headers)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue