LOG.warn -> 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.

In addition to this there will be a hacking rule to prevent this
(https://review.openstack.org/#/c/262257/)

TrivialFix

Change-Id: Ic6802778eeeb9c48e5780de46dcf1f3d272e163b
This commit is contained in:
Gary Kotton 2015-12-31 01:54:57 -08:00
parent 9e4acb0cd6
commit 87fdcee35e
2 changed files with 4 additions and 4 deletions

View File

@ -689,8 +689,8 @@ class VPNPluginRpcDbMixin(object):
vpnservice_db = self._get_vpnservice(
context, vpnservice['id'])
except vpnaas.VPNServiceNotFound:
LOG.warn(_LW('vpnservice %s in db is already deleted'),
vpnservice['id'])
LOG.warning(_LW('vpnservice %s in db is already deleted'),
vpnservice['id'])
continue
if (not utils.in_pending_status(vpnservice_db.status)

View File

@ -281,8 +281,8 @@ class _VyattaPeriodicTasks(periodic_task.PeriodicTasks):
try:
ipsec_sa = vrouter.get_vpn_ipsec_sa()
except v_exc.VRouterOperationError as e:
LOG.warn(_LW('Failed to fetch tunnel stats from router '
'{0}: {1}').format(router_id, unicode(e)))
LOG.warning(_LW('Failed to fetch tunnel stats from router '
'{0}: {1}').format(router_id, unicode(e)))
continue
conn_ok = vyatta_vpn_config.parse_vpn_connections(