Skip to content

Commit 15bc2cc

Browse files
committed
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
1 parent 52c4e5f commit 15bc2cc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎openstackclient/shell.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ def prepare_to_run_command(self, cmd):
280280
try:
281281
# Trigger the Identity client to initialize
282282
self.client_manager.auth_ref
283-
except Exception:
283+
except Exception as e:
284+
self.log.warning("Possible error authenticating: " + str(e))
284285
pass
285286
return
286287

0 commit comments

Comments
 (0)