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
This commit is contained in:
Jamie Lennox 2015-03-04 15:27:33 +11:00 committed by lin-hua-cheng
parent 5d92fc0d0a
commit 47977fcc32
2 changed files with 2 additions and 1 deletions

View File

@ -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,

View File

@ -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,