Fix dangerous default args. (#29839)

This commit is contained in:
Matt Clay 2017-09-12 00:11:13 -07:00 committed by GitHub
parent 5caa47feb9
commit 68aeaa58a8
50 changed files with 253 additions and 87 deletions

View file

@ -162,12 +162,13 @@ class Infinity(object):
self,
method='get',
resource_url='',
stat_codes=[200],
stat_codes=None,
params=None,
payload_data=None):
"""
Perform the HTTPS request by using anible get/delete method
"""
stat_codes = [200] if stat_codes is None else stat_codes
request_url = str(self.base_url) + str(resource_url)
response = None
headers = {'Content-Type': 'application/json'}