Skip to content

Commit 47977fc

Browse files
Jamie Lennoxlin-hua-cheng
authored andcommitted
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
1 parent 5d92fc0 commit 47977fc

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

openstackclient/common/clientmanager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ def __getattr__(self, name):
5454
for o in auth.OPTIONS_LIST]:
5555
return self._auth_params[name[1:]]
5656

57+
raise AttributeError(name)
58+
5759
def __init__(
5860
self,
5961
cli_options,

openstackclient/identity/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ def make_client(instance):
4646
API_VERSIONS)
4747
LOG.debug('Instantiating identity client: %s', identity_client)
4848

49-
LOG.debug('Using auth plugin: %s' % instance._auth_plugin)
5049
client = identity_client(
5150
session=instance.session,
5251
region_name=instance._region_name,

0 commit comments

Comments
 (0)