summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Lennox <jamielennox@redhat.com>2015-03-04 15:27:33 +1100
committerlin-hua-cheng <os.lcheng@gmail.com>2015-03-05 23:40:26 -0800
commit47977fcc323b1bf52a40ab98a7617fb5d638ed96 (patch)
treee105bff559fe6289c7ec920a8d1d0f194d952547
parent5d92fc0d0a7c606fdcf7a3565801ae361389d9ab (diff)
downloadpython-openstackclient-47977fcc323b1bf52a40ab98a7617fb5d638ed96.tar.gz
Raise AttributeError for unknown attributes
Not returning a value is the same as returning None. In the event that someone asks ClientManager for an attribute that doesn't exist it should raise AttributeError in the same way as other python objects rather than return an empty value. Change-Id: Id0ee825e6527c831c38e3a671958ded362fb96e1
-rw-r--r--openstackclient/common/clientmanager.py2
-rw-r--r--openstackclient/identity/client.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py
index c4307919..748894a9 100644
--- a/openstackclient/common/clientmanager.py
+++ b/openstackclient/common/clientmanager.py
@@ -54,6 +54,8 @@ class ClientManager(object):
for o in auth.OPTIONS_LIST]:
return self._auth_params[name[1:]]
+ raise AttributeError(name)
+
def __init__(
self,
cli_options,
diff --git a/openstackclient/identity/client.py b/openstackclient/identity/client.py
index d10d046d..4127a451 100644
--- a/openstackclient/identity/client.py
+++ b/openstackclient/identity/client.py
@@ -46,7 +46,6 @@ def make_client(instance):
API_VERSIONS)
LOG.debug('Instantiating identity client: %s', identity_client)
- LOG.debug('Using auth plugin: %s' % instance._auth_plugin)
client = identity_client(
session=instance.session,
region_name=instance._region_name,