summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_resizefs.py
diff options
context:
space:
mode:
authorDominic Schlegel <dominic.schlegel@hostpoint.ch>2019-10-17 14:36:40 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-10-17 14:36:40 +0000
commit7e699256b319cdf41e747211763e593a6b5f3393 (patch)
tree25b780ce0db9a766d017a5c9913ee723fd82731e /cloudinit/config/cc_resizefs.py
parentfac98983187c0984aa79c569c4b76cab90fd6f47 (diff)
downloadvyos-cloud-init-7e699256b319cdf41e747211763e593a6b5f3393.tar.gz
vyos-cloud-init-7e699256b319cdf41e747211763e593a6b5f3393.zip
replace any deprecated log.warn with log.warning
Commit 6797e822959b84c98cf73e02b2a6e3d6ab3fd4fe replaced the LOG.warn calls that linters were warning about; this also replaces calls that linters would not have recognised (as `log` is generally a parameter in these scenarios). LP: #1508442
Diffstat (limited to 'cloudinit/config/cc_resizefs.py')
-rw-r--r--cloudinit/config/cc_resizefs.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/cloudinit/config/cc_resizefs.py b/cloudinit/config/cc_resizefs.py
index afd2e060..01dfc125 100644
--- a/cloudinit/config/cc_resizefs.py
+++ b/cloudinit/config/cc_resizefs.py
@@ -8,7 +8,6 @@
"""Resizefs: cloud-config module which resizes the filesystem"""
-
import errno
import getopt
import os
@@ -183,7 +182,7 @@ def maybe_get_writable_device_path(devpath, info, log):
not container):
devpath = util.rootdev_from_cmdline(util.get_cmdline())
if devpath is None:
- log.warn("Unable to find device '/dev/root'")
+ log.warning("Unable to find device '/dev/root'")
return None
log.debug("Converted /dev/root to '%s' per kernel cmdline", devpath)
@@ -212,8 +211,8 @@ def maybe_get_writable_device_path(devpath, info, log):
log.debug("Device '%s' did not exist in container. "
"cannot resize: %s", devpath, info)
elif exc.errno == errno.ENOENT:
- log.warn("Device '%s' did not exist. cannot resize: %s",
- devpath, info)
+ log.warning("Device '%s' did not exist. cannot resize: %s",
+ devpath, info)
else:
raise exc
return None
@@ -223,8 +222,8 @@ def maybe_get_writable_device_path(devpath, info, log):
log.debug("device '%s' not a block device in container."
" cannot resize: %s" % (devpath, info))
else:
- log.warn("device '%s' not a block device. cannot resize: %s" %
- (devpath, info))
+ log.warning("device '%s' not a block device. cannot resize: %s" %
+ (devpath, info))
return None
return devpath # The writable block devpath
@@ -243,7 +242,7 @@ def handle(name, cfg, _cloud, log, args):
resize_what = "/"
result = util.get_mount_info(resize_what, log)
if not result:
- log.warn("Could not determine filesystem type of %s", resize_what)
+ log.warning("Could not determine filesystem type of %s", resize_what)
return
(devpth, fs_type, mount_point) = result
@@ -280,8 +279,8 @@ def handle(name, cfg, _cloud, log, args):
break
if not resizer:
- log.warn("Not resizing unknown filesystem type %s for %s",
- fs_type, resize_what)
+ log.warning("Not resizing unknown filesystem type %s for %s",
+ fs_type, resize_what)
return
resize_cmd = resizer(resize_what, devpth)