Merge "Fix exception in log warning when no cloud config exists"

This commit is contained in:
Zuul 2018-07-09 19:25:06 +00:00 committed by Gerrit Code Review
commit dd158b4c17
1 changed files with 9 additions and 3 deletions

View File

@ -94,9 +94,15 @@ class OSC_Config(config.OpenStackConfig):
]
for prop in domain_props:
if config['auth'].pop(prop, None) is not None:
LOG.warning("Ignoring domain related config %s for %s"
"because identity API version is 2.0" %
(prop, config['cloud']))
if config.get('cloud'):
LOG.warning(
"Ignoring domain related config %s for %s"
"because identity API version is 2.0" % (
prop, config['cloud']))
else:
LOG.warning(
"Ignoring domain related config %s because"
" identity API version is 2.0" % prop)
return config
def _auth_default_domain(self, config):