diff options
author | Monty Taylor <mordred@inaugust.com> | 2017-09-21 09:06:24 -0500 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2017-09-21 09:07:31 -0500 |
commit | ed09236683bb3d3fc0a8093912bd8abed2bd7cd8 (patch) | |
tree | cd576ebcd55e2d901a707b39a80f7fcf3f11df9b | |
parent | 424d112cd7330e1b641e67d440e11ece55961d7d (diff) | |
download | os-client-config-ed09236683bb3d3fc0a8093912bd8abed2bd7cd8.tar.gz |
Protect against p_opt not having prompt attribute
In ansible/ansible#28746 it was reported that there are times
when a p_opt is getting here that does not have a prompt
attribute. Protecting against that is fairly easy to do.
Change-Id: Ia02528f4a107893e480135bc214aa156b8684507
Closes-Bug: #1717906
-rw-r--r-- | os_client_config/config.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/os_client_config/config.py b/os_client_config/config.py index eb415f7..aac41a4 100644 --- a/os_client_config/config.py +++ b/os_client_config/config.py @@ -950,7 +950,7 @@ class OpenStackConfig(object): def option_prompt(self, config, p_opt): """Prompt user for option that requires a value""" if ( - p_opt.prompt is not None and + getattr(p_opt, 'prompt', None) is not None and p_opt.dest not in config['auth'] and self._pw_callback is not None ): |