diff options
| author | Jamie Lennox <jamielennox@redhat.com> | 2015-03-04 15:27:33 +1100 |
|---|---|---|
| committer | lin-hua-cheng <os.lcheng@gmail.com> | 2015-03-05 23:40:26 -0800 |
| commit | 47977fcc323b1bf52a40ab98a7617fb5d638ed96 (patch) | |
| tree | e105bff559fe6289c7ec920a8d1d0f194d952547 /openstackclient/common/clientmanager.py | |
| parent | 5d92fc0d0a7c606fdcf7a3565801ae361389d9ab (diff) | |
| download | python-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
Diffstat (limited to 'openstackclient/common/clientmanager.py')
| -rw-r--r-- | openstackclient/common/clientmanager.py | 2 |
1 files changed, 2 insertions, 0 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, |
