Added None Checks

Fixes #77
Added None checks to avoid an exception if there aren't tasks.

Change-Id: I44b4164462fd613b356b520027de5a18e88e1fb9
This commit is contained in:
Aaron Sheffield 2018-03-06 10:24:42 -06:00
parent 2b26d5204c
commit 42aa3c486e
1 changed files with 3 additions and 1 deletions

View File

@ -889,7 +889,9 @@ class DeployNodes(BaseAction):
"Unable to configure platform on any nodes, skipping deploy subtask"
)
if len(node_deploy_task.result.successes) > 0:
if (node_deploy_task is not None
and node_deploy_task.result is not None
and len(node_deploy_task.result.successes) > 0):
node_bootaction_task = self.orchestrator.create_task(
design_ref=self.task.design_ref,
action=hd_fields.OrchestratorAction.BootactionReport,