Remove mutable default arguments.

This commit is contained in:
gduke 2015-10-20 22:13:23 -07:00
parent 10e2fc6f60
commit 744679601f
2 changed files with 6 additions and 2 deletions

View file

@ -150,7 +150,9 @@ class AnsibleCloudStack(object):
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 in my_dict:
return my_dict[key]