summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Cresswell <robert.cresswell@outlook.com>2017-07-11 15:33:08 +0100
committerRob Cresswell <robert.cresswell@outlook.com>2017-07-11 15:33:08 +0100
commita0af708a49518937eab3656e7a4302687508a2ce (patch)
tree130bcb08b742a214dce0cba082ed83b6bc2e8198
parentc15dfe5acd58efa0c5c27dd19de5d4ef2a880c36 (diff)
Fix default mutable arg in k2k.py
Notes
Notes (review): Code-Review+2: Akihiro Motoki <amotoki@gmail.com> Workflow+1: Akihiro Motoki <amotoki@gmail.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 12 Jul 2017 07:13:49 +0000 Reviewed-on: https://review.openstack.org/482582 Project: openstack/django_openstack_auth Branch: refs/heads/master
-rw-r--r--openstack_auth/plugin/k2k.py5
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']
28 28
29class K2KAuthPlugin(base.BasePlugin): 29class K2KAuthPlugin(base.BasePlugin):
30 30
31 def get_plugin(self, service_provider=None, auth_url=None, plugins=[], 31 def get_plugin(self, service_provider=None, auth_url=None, plugins=None,
32 **kwargs): 32 **kwargs):
33 """Authenticate using keystone to keystone federation. 33 """Authenticate using keystone to keystone federation.
34 34
@@ -42,6 +42,9 @@ class K2KAuthPlugin(base.BasePlugin):
42 :returns Keystone2Keystone keystone auth plugin 42 :returns Keystone2Keystone keystone auth plugin
43 """ 43 """
44 44
45 # Avoid mutable default arg for plugins
46 plugins = plugins or []
47
45 # service_provider being None prevents infinite recursion 48 # service_provider being None prevents infinite recursion
46 if utils.get_keystone_version() < 3 or not service_provider: 49 if utils.get_keystone_version() < 3 or not service_provider:
47 return None 50 return None