diff options
author | Scott Moser <smoser@ubuntu.com> | 2018-07-21 15:30:58 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2018-07-21 15:30:58 +0000 |
commit | 2a9d6203d946484cbe24297fe0e48a42a800756a (patch) | |
tree | 3af7ecced6004d4e525014687e0228838878bf3d /cloudinit/config/cc_lxd.py | |
parent | e3e05e769a11cd2cb18e71150b05873dac95c84b (diff) | |
download | vyos-cloud-init-2a9d6203d946484cbe24297fe0e48a42a800756a.tar.gz vyos-cloud-init-2a9d6203d946484cbe24297fe0e48a42a800756a.zip |
pylint: Fix pylint warnings reported in pylint 2.0.0.
Pylint 2.0.0 was recently released and complains more about
logging-not-lazy than it used to. I've fixed those warnings, here.
The changes in rh_subscription are more extensive. pylint may be
complaining incorrectly there, but the tests were not correctly un-doing
all of their mock/patching. This cleans those up and makes pylint happy.
Diffstat (limited to 'cloudinit/config/cc_lxd.py')
-rw-r--r-- | cloudinit/config/cc_lxd.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cloudinit/config/cc_lxd.py b/cloudinit/config/cc_lxd.py index ac72ac4a..a604825a 100644 --- a/cloudinit/config/cc_lxd.py +++ b/cloudinit/config/cc_lxd.py @@ -276,27 +276,27 @@ def maybe_cleanup_default(net_name, did_init, create, attach, if net_name != _DEFAULT_NETWORK_NAME or not did_init: return - fail_assume_enoent = " failed. Assuming it did not exist." - succeeded = " succeeded." + fail_assume_enoent = "failed. Assuming it did not exist." + succeeded = "succeeded." if create: - msg = "Deletion of lxd network '%s'" % net_name + msg = "Deletion of lxd network '%s' %s" try: _lxc(["network", "delete", net_name]) - LOG.debug(msg + succeeded) + LOG.debug(msg, net_name, succeeded) except util.ProcessExecutionError as e: if e.exit_code != 1: raise e - LOG.debug(msg + fail_assume_enoent) + LOG.debug(msg, net_name, fail_assume_enoent) if attach: - msg = "Removal of device '%s' from profile '%s'" % (nic_name, profile) + msg = "Removal of device '%s' from profile '%s' %s" try: _lxc(["profile", "device", "remove", profile, nic_name]) - LOG.debug(msg + succeeded) + LOG.debug(msg, nic_name, profile, succeeded) except util.ProcessExecutionError as e: if e.exit_code != 1: raise e - LOG.debug(msg + fail_assume_enoent) + LOG.debug(msg, nic_name, profile, fail_assume_enoent) # vi: ts=4 expandtab |