From c92954ee9d3ccc28e94c0d824bf6ec0e34e56916 Mon Sep 17 00:00:00 2001 From: zhangguoqing Date: Mon, 4 Jan 2016 13:53:13 +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: I9a99477f3f41884e86c984ffde9f46498953e933 Closes-Bug: #1530742 --- .../roles/os_neutron/templates/neutron-ha-tool.py.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/playbooks/roles/os_neutron/templates/neutron-ha-tool.py.j2 b/playbooks/roles/os_neutron/templates/neutron-ha-tool.py.j2 index c5d5deaefd..70d500c0b8 100644 --- a/playbooks/roles/os_neutron/templates/neutron-ha-tool.py.j2 +++ b/playbooks/roles/os_neutron/templates/neutron-ha-tool.py.j2 @@ -314,13 +314,13 @@ def l3_agent_check(qclient): try: target_id = random.choice(agent_alive_list) except IndexError: - LOG.warn("There are no l3 agents alive we could " - "migrate routers onto.") + LOG.warning("There are no l3 agents alive we could " + "migrate routers onto.") target_id = None migration_count += 1 - LOG.warn("Would like to migrate router=%s to agent=%s", - router_id, target_id) + LOG.warning("Would like to migrate router=%s to agent=%s", + router_id, target_id) if migration_count > 0: sys.exit(2)