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. Closes-Bug: #1530742 Change-Id: I9f9f303d7482d0ecc44461bab5ed8f92926436f4
This commit is contained in:
parent
52356c91d0
commit
b3d5dfd3d9
|
@ -51,7 +51,7 @@ def get_available_networks(request, include_subnets=True,
|
|||
networks = neutron.network_list_for_tenant(request,
|
||||
tenant_id=tenant_id)
|
||||
except exceptions.ServiceCatalogException:
|
||||
LOG.warn("Neutron not found. Assuming Nova Network usage")
|
||||
LOG.warning("Neutron not found. Assuming Nova Network usage")
|
||||
return None
|
||||
|
||||
# Remove external networks
|
||||
|
|
|
@ -35,7 +35,7 @@ def filter_murano_images(images, request=None):
|
|||
metadata = json.loads(metadata)
|
||||
except ValueError:
|
||||
msg = _('Invalid metadata for image: {0}').format(image.id)
|
||||
LOG.warn(msg)
|
||||
LOG.warning(msg)
|
||||
if request:
|
||||
exceptions.handle(request, msg)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue