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:
zhurong 2015-12-22 07:46:45 +08:00
parent 52356c91d0
commit b3d5dfd3d9
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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: