Replace LOG.warn with LOG.warning

logging.warn is deprecated in Python 3.[1]
[1] https://docs.python.org/3/library/logging.html#logging.warning

Change-Id: I93834b869fb5eeeae270bcd63fcd1b12800e45d9
This commit is contained in:
gecong1973 2016-11-16 16:08:51 +08:00 committed by gecong
parent e36e074afb
commit 40ebe1b1ff
1 changed files with 3 additions and 2 deletions

View File

@ -60,7 +60,8 @@ def _get_service_url(request):
"""Get freezer api url"""
hardcoded_url = getattr(settings, 'FREEZER_API_URL', None)
if hardcoded_url is not None:
LOG.warn('Using hardcoded FREEZER_API_URL: {0}'.format(hardcoded_url))
LOG.warning('Using hardcoded FREEZER_API_URL:{0}'
.format(hardcoded_url))
return hardcoded_url
e_type = getattr(settings, 'OPENSTACK_ENDPOINT_TYPE', '')
@ -78,7 +79,7 @@ def _get_service_url(request):
raise ValueError('Could no get FREEZER_API_URL from config'
' or Keystone')
except Exception:
LOG.warn('Could no get FREEZER_API_URL from config or Keystone')
LOG.warning('Could no get FREEZER_API_URL from config or Keystone')
raise