Remove mutable default arguments.

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

View file

@ -400,7 +400,9 @@ class RequestWithMethod(urllib2.Request):
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
urllib2.Request.__init__(self, url, data, headers)