diff options
| author | TerryHowe <terrylhowe@gmail.com> | 2015-04-17 07:54:05 -0600 |
|---|---|---|
| committer | TerryHowe <terrylhowe@gmail.com> | 2015-04-17 07:54:05 -0600 |
| commit | 15bc2ccec9ca9df940a548da3cd810a107f45b39 (patch) | |
| tree | 2d4eae83a28f05a93a46abb756514215f6db2aeb /openstackclient/shell.py | |
| parent | 52c4e5fa87d4f95468301b6d5e2fc10dfbb90650 (diff) | |
| download | python-openstackclient-15bc2ccec9ca9df940a548da3cd810a107f45b39.tar.gz | |
Print warning on authentication error
At least print a warning on authentication error. I have no
idea why an exception is being ignored here because if there
is no session, nothing is going to happen. This at least will
print some useful warning:
(.venv)terry@f350:~/python-openstackclient$ os flavor list --os-cloud pro
WARNING: openstackclient.shell Possible error authenticating: __init__() got an unexpected keyword argument 'asdf'
ERROR: openstack Authentication requires 'auth_url', which should be specified in 'HTTPClient'
This error was caused by having a bogus value 'asdf' in the cloud.yaml
for the cloud pro.
Change-Id: Ie08432e0464cfa86b3b3f67ca29d3b7d23d2f46f
Diffstat (limited to 'openstackclient/shell.py')
| -rw-r--r-- | openstackclient/shell.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/openstackclient/shell.py b/openstackclient/shell.py index c118fbd2..be13d358 100644 --- a/openstackclient/shell.py +++ b/openstackclient/shell.py @@ -280,7 +280,8 @@ class OpenStackShell(app.App): try: # Trigger the Identity client to initialize self.client_manager.auth_ref - except Exception: + except Exception as e: + self.log.warning("Possible error authenticating: " + str(e)) pass return |
