Change LOG.warn to LOG.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: I2c7db9f6a97b131700c3aad5d49b6a206141f34b
Closes-Bug: #1530742
This commit is contained in:
zhangguoqing 2016-01-04 04:52:39 +00:00 committed by hardik
parent a68b4c20f3
commit 39a025fce4
2 changed files with 2 additions and 2 deletions

View File

@ -380,7 +380,7 @@ class DefaultEngine(base.Engine, coordination.Service):
try:
final_context = wf_ctrl.evaluate_workflow_final_context()
except Exception as e:
LOG.warn(
LOG.warning(
"Failed to get final context for %s: %s" % (wf_ex, e)
)
return wf_handler.succeed_workflow(

View File

@ -76,7 +76,7 @@ class DefaultExecutor(base.Executor, coordination.Service):
" Actual init params = %s. More info: %s"
% (action_class_str, i_u.get_arg_list(action_cls.__init__),
action_params.keys(), e))
LOG.warn(msg)
LOG.warning(msg)
except exc.ActionException as e:
msg = ("Failed to run action [action_ex_id=%s, action_cls='%s',"