summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_lxd.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_lxd.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_lxd.py')
-rw-r--r--cloudinit/config/cc_lxd.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/cloudinit/config/cc_lxd.py b/cloudinit/config/cc_lxd.py
index d9830770..151a9844 100644
--- a/cloudinit/config/cc_lxd.py
+++ b/cloudinit/config/cc_lxd.py
@@ -66,21 +66,21 @@ def handle(name, cfg, cloud, log, args):
name)
return
if not isinstance(lxd_cfg, dict):
- log.warn("lxd config must be a dictionary. found a '%s'",
- type(lxd_cfg))
+ log.warning("lxd config must be a dictionary. found a '%s'",
+ type(lxd_cfg))
return
# Grab the configuration
init_cfg = lxd_cfg.get('init')
if not isinstance(init_cfg, dict):
- log.warn("lxd/init config must be a dictionary. found a '%s'",
- type(init_cfg))
+ log.warning("lxd/init config must be a dictionary. found a '%s'",
+ type(init_cfg))
init_cfg = {}
bridge_cfg = lxd_cfg.get('bridge', {})
if not isinstance(bridge_cfg, dict):
- log.warn("lxd/bridge config must be a dictionary. found a '%s'",
- type(bridge_cfg))
+ log.warning("lxd/bridge config must be a dictionary. found a '%s'",
+ type(bridge_cfg))
bridge_cfg = {}
# Install the needed packages
@@ -95,7 +95,7 @@ def handle(name, cfg, cloud, log, args):
try:
cloud.distro.install_packages(packages)
except util.ProcessExecutionError as exc:
- log.warn("failed to install packages %s: %s", packages, exc)
+ log.warning("failed to install packages %s: %s", packages, exc)
return
# Set up lxd if init config is given
@@ -301,5 +301,4 @@ def maybe_cleanup_default(net_name, did_init, create, attach,
raise e
LOG.debug(msg, nic_name, profile, fail_assume_enoent)
-
# vi: ts=4 expandtab