Merge "Replace LOG.warn with LOG.warning"

This commit is contained in:
Jenkins 2016-12-27 07:31:59 +00:00 committed by Gerrit Code Review
commit 3e701f6cf4
1 changed files with 5 additions and 1 deletions

View File

@ -28,6 +28,7 @@ from oslo_log import log as logging
import tricircle.common.context as tricircle_context
from tricircle.common import exceptions
from tricircle.common.i18n import _LW
from tricircle.common import resource_handle
from tricircle.db import api
from tricircle.db import models
@ -95,7 +96,10 @@ def _safe_operation(operation_name):
if i == retries:
raise
if cfg.CONF.client.auto_refresh_endpoint:
LOG.warn(e.message + ', update endpoint and try again')
msg = _LW("%(exception)s, "
"update endpoint and try again") % {
"exception": e.message}
LOG.warning(msg)
instance._update_endpoint_from_keystone(context, True)
else:
raise