diff options
author | Dominic Schlegel <dominic.schlegel@hostpoint.ch> | 2019-10-17 14:36:40 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2019-10-17 14:36:40 +0000 |
commit | 7e699256b319cdf41e747211763e593a6b5f3393 (patch) | |
tree | 25b780ce0db9a766d017a5c9913ee723fd82731e /cloudinit/config/cc_mounts.py | |
parent | fac98983187c0984aa79c569c4b76cab90fd6f47 (diff) | |
download | vyos-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_mounts.py')
-rw-r--r-- | cloudinit/config/cc_mounts.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py index 123ffb84..c741c746 100644 --- a/cloudinit/config/cc_mounts.py +++ b/cloudinit/config/cc_mounts.py @@ -251,10 +251,10 @@ def setup_swapfile(fname, size=None, maxsize=None): util.ensure_dir(tdir) util.log_time(LOG.debug, msg, func=util.subp, args=[['sh', '-c', - ('rm -f "$1" && umask 0066 && ' - '{ fallocate -l "${2}M" "$1" || ' - ' dd if=/dev/zero "of=$1" bs=1M "count=$2"; } && ' - 'mkswap "$1" || { r=$?; rm -f "$1"; exit $r; }'), + ('rm -f "$1" && umask 0066 && ' + '{ fallocate -l "${2}M" "$1" || ' + 'dd if=/dev/zero "of=$1" bs=1M "count=$2"; } && ' + 'mkswap "$1" || { r=$?; rm -f "$1"; exit $r; }'), 'setup_swap', fname, mbsize]]) except Exception as e: @@ -347,8 +347,8 @@ def handle(_name, cfg, cloud, log, _args): for i in range(len(cfgmnt)): # skip something that wasn't a list if not isinstance(cfgmnt[i], list): - log.warn("Mount option %s not a list, got a %s instead", - (i + 1), type_utils.obj_name(cfgmnt[i])) + log.warning("Mount option %s not a list, got a %s instead", + (i + 1), type_utils.obj_name(cfgmnt[i])) continue start = str(cfgmnt[i][0]) @@ -495,7 +495,7 @@ def handle(_name, cfg, cloud, log, _args): util.subp(cmd) log.debug(fmt, "PASS") except util.ProcessExecutionError: - log.warn(fmt, "FAIL") + log.warning(fmt, "FAIL") util.logexc(log, fmt, "FAIL") # vi: ts=4 expandtab |