summaryrefslogtreecommitdiff
path: root/ironic_python_agent/extensions
diff options
context:
space:
mode:
authorJohn L. Villalovos <john.l.villalovos@intel.com>2016-11-08 11:08:21 -0800
committerJohn L. Villalovos <john.l.villalovos@intel.com>2016-11-08 11:31:18 -0800
commit0b8763e33221c585207ec33caf05adfba7fad867 (patch)
treeba6704af7f54c1ca9854a991cd14f6d10b9fc1d8 /ironic_python_agent/extensions
parentfb3a56d185e9ee22df44c2cb83324b354f9973e5 (diff)
downloadironic-python-agent-0b8763e33221c585207ec33caf05adfba7fad867.tar.gz
Update to hacking 0.12.0 and use new checks
Use hacking 0.12.0 Use the new checks that are available: [H106] Don’t put vim configuration in source files. [H203] Use assertIs(Not)None to check for None. [H904] Delay string interpolations at logging calls. Fix code so tests pass. Change-Id: If22ad272c332f30624ce10861408d377908b152b Depends-On: I2aa44b62f900d4dfd67701b01eadd0523fbfaf07
Diffstat (limited to 'ironic_python_agent/extensions')
-rw-r--r--ironic_python_agent/extensions/flow.py4
-rw-r--r--ironic_python_agent/extensions/image.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/ironic_python_agent/extensions/flow.py b/ironic_python_agent/extensions/flow.py
index a080747a..8ef17ca0 100644
--- a/ironic_python_agent/extensions/flow.py
+++ b/ironic_python_agent/extensions/flow.py
@@ -36,10 +36,10 @@ class FlowExtension(base.BaseAgentExtension, base.ExecuteCommandMixin):
def start_flow(self, flow=None):
for task in flow:
for method, params in task.items():
- LOG.info("Executing method %s for now" % method)
+ LOG.info("Executing method %s for now", method)
result = self.execute_command(method, **params)
result.join()
- LOG.info("%s method's execution is done" % method)
+ LOG.info("%s method's execution is done", method)
if result.command_status == base.AgentCommandStatus.FAILED:
raise errors.CommandExecutionError(
"%s was failed" % method
diff --git a/ironic_python_agent/extensions/image.py b/ironic_python_agent/extensions/image.py
index 35c9f76d..5eded3bf 100644
--- a/ironic_python_agent/extensions/image.py
+++ b/ironic_python_agent/extensions/image.py
@@ -48,7 +48,7 @@ def _get_partition(device, uuid):
utils.execute('udevadm', 'settle')
except processutils.ProcessExecutionError:
LOG.warning("Couldn't re-read the partition table "
- "on device %s" % device)
+ "on device %s", device)
report = utils.execute('lsblk', '-PbioKNAME,UUID,TYPE', device)[0]
for line in report.split('\n'):