Fix default mutable arg in k2k.py
Change-Id: I9e8d838315d521874e6f92922a9f488ee7029dbc
This commit is contained in:
parent
c15dfe5acd
commit
a0af708a49
@ -28,7 +28,7 @@ __all__ = ['K2KAuthPlugin']
|
|||||||
|
|
||||||
class K2KAuthPlugin(base.BasePlugin):
|
class K2KAuthPlugin(base.BasePlugin):
|
||||||
|
|
||||||
def get_plugin(self, service_provider=None, auth_url=None, plugins=[],
|
def get_plugin(self, service_provider=None, auth_url=None, plugins=None,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
"""Authenticate using keystone to keystone federation.
|
"""Authenticate using keystone to keystone federation.
|
||||||
|
|
||||||
@ -42,6 +42,9 @@ class K2KAuthPlugin(base.BasePlugin):
|
|||||||
:returns Keystone2Keystone keystone auth plugin
|
:returns Keystone2Keystone keystone auth plugin
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# Avoid mutable default arg for plugins
|
||||||
|
plugins = plugins or []
|
||||||
|
|
||||||
# service_provider being None prevents infinite recursion
|
# service_provider being None prevents infinite recursion
|
||||||
if utils.get_keystone_version() < 3 or not service_provider:
|
if utils.get_keystone_version() < 3 or not service_provider:
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user