summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2015-09-18 09:55:55 +0200
committerMonty Taylor <mordred@inaugust.com>2015-09-18 09:55:55 +0200
commit21bb2f347d0d52defa98726b7102c1853b558072 (patch)
tree7d49cdb0f0f99b2c793cb8528a12a7f08ce07e5f
parent64d3393a620d87634e2a4bb0afb15eb815641421 (diff)
downloados-client-config-21bb2f347d0d52defa98726b7102c1853b558072.tar.gz
Move plugin loader creation to try block1.7.2
We only need the plugin loader if we're going to create an auth plugin. Doing this when validate=False is clearly not a workable solution, because we'll wind up validating unknown plugins. Change-Id: Ieed44aa3ef41a14edd7529ca599a01967d517207
-rw-r--r--os_client_config/config.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/os_client_config/config.py b/os_client_config/config.py
index 387d014..5dbe8db 100644
--- a/os_client_config/config.py
+++ b/os_client_config/config.py
@@ -495,8 +495,8 @@ class OpenStackConfig(object):
if type(config[key]) is not bool:
config[key] = get_boolean(config[key])
- loader = self._get_auth_loader(config)
if validate:
+ loader = self._get_auth_loader(config)
config = self._validate_auth(config, loader)
auth_plugin = loader.load_from_options(**config['auth'])
else: