Do not use dictionaries as default parameters
Change-Id: I1e2b7065a7cfad2511fbcee669f666257ef291d0
This commit is contained in:
@@ -916,7 +916,7 @@ class Connection(object):
|
|||||||
|
|
||||||
def __init__(self, authurl, user, key, retries=5, preauthurl=None,
|
def __init__(self, authurl, user, key, retries=5, preauthurl=None,
|
||||||
preauthtoken=None, snet=False, starting_backoff=1,
|
preauthtoken=None, snet=False, starting_backoff=1,
|
||||||
tenant_name=None, os_options={}, auth_version="1"):
|
tenant_name=None, os_options=None, auth_version="1"):
|
||||||
"""
|
"""
|
||||||
:param authurl: authentication URL
|
:param authurl: authentication URL
|
||||||
:param user: user name to authenticate as
|
:param user: user name to authenticate as
|
||||||
@@ -944,9 +944,9 @@ class Connection(object):
|
|||||||
self.snet = snet
|
self.snet = snet
|
||||||
self.starting_backoff = starting_backoff
|
self.starting_backoff = starting_backoff
|
||||||
self.auth_version = auth_version
|
self.auth_version = auth_version
|
||||||
|
self.os_options = os_options or {}
|
||||||
if tenant_name:
|
if tenant_name:
|
||||||
os_options['tenant_name'] = tenant_name
|
self.os_options['tenant_name'] = tenant_name
|
||||||
self.os_options = os_options
|
|
||||||
|
|
||||||
def get_auth(self):
|
def get_auth(self):
|
||||||
return get_auth(self.authurl,
|
return get_auth(self.authurl,
|
||||||
|
Reference in New Issue
Block a user