From b3d5dfd3d92159e9e3f75fa9f6e69f751d87f0be Mon Sep 17 00:00:00 2001 From: zhurong Date: Tue, 22 Dec 2015 07:46:45 +0800 Subject: [PATCH] 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 --- muranodashboard/common/net.py | 2 +- muranodashboard/images/forms.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/muranodashboard/common/net.py b/muranodashboard/common/net.py index 199a7fb83..cf4c4f84d 100644 --- a/muranodashboard/common/net.py +++ b/muranodashboard/common/net.py @@ -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 diff --git a/muranodashboard/images/forms.py b/muranodashboard/images/forms.py index f50923a14..d763b29db 100644 --- a/muranodashboard/images/forms.py +++ b/muranodashboard/images/forms.py @@ -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: