From 3bb4c37c882283762c0e3c9839dca9e9fdf8d834 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 21 Sep 2017 09:06:24 -0500 Subject: [PATCH] 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 --- openstack/config/loader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstack/config/loader.py b/openstack/config/loader.py index 58017ecb8..288c97dde 100644 --- a/openstack/config/loader.py +++ b/openstack/config/loader.py @@ -961,7 +961,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 ):