diff options
author | Rob Cresswell <robert.cresswell@outlook.com> | 2017-07-11 15:33:08 +0100 |
---|---|---|
committer | Rob Cresswell <robert.cresswell@outlook.com> | 2017-07-12 07:33:28 +0000 |
commit | 18bb66070ad94e448fba155aaaf8c13ca1cba5ac (patch) | |
tree | ca883580e0ac0dd7f3828ad810701e672db908a4 | |
parent | d53df9b257606c961744302fe1d8c08541a80e4d (diff) | |
download | django_openstack_auth-18bb66070ad94e448fba155aaaf8c13ca1cba5ac.tar.gz |
Fix default mutable arg in k2k.py
Change-Id: I9e8d838315d521874e6f92922a9f488ee7029dbc
(cherry picked from commit a0af708a49518937eab3656e7a4302687508a2ce)
-rw-r--r-- | openstack_auth/plugin/k2k.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openstack_auth/plugin/k2k.py b/openstack_auth/plugin/k2k.py index 03a85f0..ba4cbf6 100644 --- a/openstack_auth/plugin/k2k.py +++ b/openstack_auth/plugin/k2k.py @@ -28,7 +28,7 @@ __all__ = ['K2KAuthPlugin'] 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): """Authenticate using keystone to keystone federation. @@ -42,6 +42,9 @@ class K2KAuthPlugin(base.BasePlugin): :returns Keystone2Keystone keystone auth plugin """ + # Avoid mutable default arg for plugins + plugins = plugins or [] + # service_provider being None prevents infinite recursion if utils.get_keystone_version() < 3 or not service_provider: return None |