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:
|
||||
msg = _('No authentication backend could be determined to '
|
||||
'handle the provided credentials.')
|
||||
LOG.warn('No authentication backend could be determined to '
|
||||
'handle the provided credentials. This is likely a '
|
||||
'configuration error that should be addressed.')
|
||||
LOG.warning('No authentication backend could be determined to '
|
||||
'handle the provided credentials. This is likely a '
|
||||
'configuration error that should be addressed.')
|
||||
raise exceptions.KeystoneAuthException(msg)
|
||||
|
||||
session = utils.get_session()
|
||||
|
|
|
@ -58,8 +58,8 @@ def _get_enforcer():
|
|||
LOG.debug("adding enforcer for service: %s" % service)
|
||||
_ENFORCER[service] = enforcer
|
||||
else:
|
||||
LOG.warn("policy file for service: %s not found at %s" %
|
||||
(service, enforcer.policy_path))
|
||||
LOG.warning("policy file for service: %s not found at %s" %
|
||||
(service, enforcer.policy_path))
|
||||
return _ENFORCER
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue