summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceEc2.py
diff options
context:
space:
mode:
authorJoshua Powers <josh.powers@canonical.com>2017-04-06 11:14:29 -0700
committerScott Moser <smoser@ubuntu.com>2017-04-21 10:14:47 -0400
commit5afe4cd0797a12d07ea19b9715b720d47bdea401 (patch)
tree8be9e7b623002b1fd60fb21b95696ab6b67ca497 /cloudinit/sources/DataSourceEc2.py
parent33816e96d8981918f734dab3ee1a967bce85451a (diff)
downloadvyos-cloud-init-5afe4cd0797a12d07ea19b9715b720d47bdea401.tar.gz
vyos-cloud-init-5afe4cd0797a12d07ea19b9715b720d47bdea401.zip
pylint: fix all logging warnings
This will change all instances of LOG.warn to LOG.warning as warn is now a deprecated method. It will also make sure any logging uses lazy logging by passing string format arguments as function parameters.
Diffstat (limited to 'cloudinit/sources/DataSourceEc2.py')
-rw-r--r--cloudinit/sources/DataSourceEc2.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/cloudinit/sources/DataSourceEc2.py b/cloudinit/sources/DataSourceEc2.py
index 6f01a139..2f9c7edf 100644
--- a/cloudinit/sources/DataSourceEc2.py
+++ b/cloudinit/sources/DataSourceEc2.py
@@ -125,7 +125,7 @@ class DataSourceEc2(sources.DataSource):
if len(filtered):
mdurls = filtered
else:
- LOG.warn("Empty metadata url list! using default list")
+ LOG.warning("Empty metadata url list! using default list")
mdurls = self.metadata_urls
urls = []
@@ -232,7 +232,7 @@ def read_strict_mode(cfgval, default):
try:
return parse_strict_mode(cfgval)
except ValueError as e:
- LOG.warn(e)
+ LOG.warning(e)
return default
@@ -270,7 +270,7 @@ def warn_if_necessary(cfgval, cfg):
try:
mode, sleep = parse_strict_mode(cfgval)
except ValueError as e:
- LOG.warn(e)
+ LOG.warning(e)
return
if mode == "false":
@@ -304,8 +304,8 @@ def identify_platform():
if result:
return result
except Exception as e:
- LOG.warn("calling %s with %s raised exception: %s",
- checker, data, e)
+ LOG.warning("calling %s with %s raised exception: %s",
+ checker, data, e)
def _collect_platform_data():