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:
parent
e36e074afb
commit
40ebe1b1ff
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue