Python 3 deprecated the logger.warn method in favor of warning
Python 3 deprecated the logger.warn method, see: https://docs.python.org/3/library/logging.html#logging.warning, so we prefer to use warning to avoid DeprecationWarning. Change-Id: Ibc234aedad20351861462f1ebd0457632bdfd048 Closes-Bug: #1508442
This commit is contained in:
parent
ad98c9dd5b
commit
2d88515aff
|
@ -100,9 +100,9 @@ class KeystoneBackend(object):
|
||||||
else:
|
else:
|
||||||
msg = _('No authentication backend could be determined to '
|
msg = _('No authentication backend could be determined to '
|
||||||
'handle the provided credentials.')
|
'handle the provided credentials.')
|
||||||
LOG.warn('No authentication backend could be determined to '
|
LOG.warning('No authentication backend could be determined to '
|
||||||
'handle the provided credentials. This is likely a '
|
'handle the provided credentials. This is likely a '
|
||||||
'configuration error that should be addressed.')
|
'configuration error that should be addressed.')
|
||||||
raise exceptions.KeystoneAuthException(msg)
|
raise exceptions.KeystoneAuthException(msg)
|
||||||
|
|
||||||
session = utils.get_session()
|
session = utils.get_session()
|
||||||
|
|
|
@ -58,8 +58,8 @@ def _get_enforcer():
|
||||||
LOG.debug("adding enforcer for service: %s" % service)
|
LOG.debug("adding enforcer for service: %s" % service)
|
||||||
_ENFORCER[service] = enforcer
|
_ENFORCER[service] = enforcer
|
||||||
else:
|
else:
|
||||||
LOG.warn("policy file for service: %s not found at %s" %
|
LOG.warning("policy file for service: %s not found at %s" %
|
||||||
(service, enforcer.policy_path))
|
(service, enforcer.policy_path))
|
||||||
return _ENFORCER
|
return _ENFORCER
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue