Silence the YAML NoneType warning for password_security-compliance
If the value is not set (the default) then the context causes a error message to be emitted to the Juju log. Whilst this doesn't affect the operations of the charm, it is likely to cause support requests. This change only attempts to decode the config option if it is actually set. Change-Id: I0ccccdab92cb46f7354732f9d620797910ba55c0
This commit is contained in:
parent
7ff71cad6c
commit
5871699dd4
@ -217,9 +217,13 @@ class KeystoneContext(context.OSContextGenerator):
|
||||
flags = context.config_flags_parser(ldap_flags)
|
||||
ctxt['ldap_config_flags'] = flags
|
||||
|
||||
# Only try to decode it if there is something actually set - this
|
||||
# siliences a NoneType warning in the logs if it isn't set
|
||||
password_security_compliance = config('password-security-compliance')
|
||||
if password_security_compliance:
|
||||
ctxt['password_security_compliance'] = (
|
||||
self._decode_password_security_compliance_string(
|
||||
config('password-security-compliance')))
|
||||
password_security_compliance))
|
||||
|
||||
# Base endpoint URL's which are used in keystone responses
|
||||
# to unauthenticated requests to redirect clients to the
|
||||
|
Loading…
Reference in New Issue
Block a user