From 39a025fce45dd5d5721d6263439b70c48359d798 Mon Sep 17 00:00:00 2001 From: zhangguoqing Date: Mon, 4 Jan 2016 04:52:39 +0000 Subject: [PATCH] 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 --- mistral/engine/default_engine.py | 2 +- mistral/engine/default_executor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mistral/engine/default_engine.py b/mistral/engine/default_engine.py index 404959fa5..973b7eba2 100644 --- a/mistral/engine/default_engine.py +++ b/mistral/engine/default_engine.py @@ -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( diff --git a/mistral/engine/default_executor.py b/mistral/engine/default_executor.py index f9d4a7403..93882b853 100644 --- a/mistral/engine/default_executor.py +++ b/mistral/engine/default_executor.py @@ -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',"