Merge "Readability fixes for cleaning_reboot code"

This commit is contained in:
Jenkins 2016-03-30 19:14:58 +00:00 committed by Gerrit Code Review
commit cdfa120e06

View File

@ -300,8 +300,8 @@ class BaseAgentVendor(base.VendorInterface):
manual_clean = node.target_provision_state == states.MANAGEABLE
agent_commands = self._client.get_commands_status(task.node)
if (not agent_commands and
task.node.driver_internal_info.get('cleaning_reboot')):
if not agent_commands:
if task.node.driver_internal_info.get('cleaning_reboot'):
# Node finished a cleaning step that requested a reboot, and
# this is the first heartbeat after booting. Continue cleaning.
info = task.node.driver_internal_info
@ -309,8 +309,7 @@ class BaseAgentVendor(base.VendorInterface):
task.node.driver_internal_info = info
self.notify_conductor_resume_clean(task)
return
if not agent_commands:
else:
# Agent has no commands whatsoever
return