From 47c2bc0ee3653686862878ad2c42032c5e443a87 Mon Sep 17 00:00:00 2001 From: Cao Xuan Hoang Date: Mon, 26 Sep 2016 16:38:13 +0700 Subject: [PATCH] Fix LOG.warn to LOG.warning logging.warn is deprecated in Python 3. https://docs.python.org/3/library/logging.html#logging.warning Change-Id: I78774cd75ff78acd6a572e3e9f52ce52e2497594 --- fuelmenu/modules/bootstrapimg.py | 4 ++-- fuelmenu/modules/dnsandhostname.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fuelmenu/modules/bootstrapimg.py b/fuelmenu/modules/bootstrapimg.py index 90f96a4..ddddf85 100644 --- a/fuelmenu/modules/bootstrapimg.py +++ b/fuelmenu/modules/bootstrapimg.py @@ -359,8 +359,8 @@ class BootstrapImage(urwid.WidgetWrap): # repository since it is not created at that moment. Although we # still should provide an ability to use it, because in fact # it will be created at the end of deployment. - log.warn('Accessibility check is skipped for local repository: %s', - release_url) + log.warning('Accessibility check is skipped for local ' + 'repository: {}'.format(release_url)) return True return self.check_url(release_url, proxies) diff --git a/fuelmenu/modules/dnsandhostname.py b/fuelmenu/modules/dnsandhostname.py index bc370d1..5bdb01d 100644 --- a/fuelmenu/modules/dnsandhostname.py +++ b/fuelmenu/modules/dnsandhostname.py @@ -336,7 +336,7 @@ is accessible"} if line.startswith("nameserver "): nameservers.append(line.split(' ')[1]) except EnvironmentError: - log.warn("Unable to open /etc/resolv.conf") + log.warning("Unable to open /etc/resolv.conf") # Always remove local IPs from nameserver list host_ips = network.list_host_ip_addresses()