From 42aa3c486ee4c495c2377d31481df5ab681f84f2 Mon Sep 17 00:00:00 2001 From: Aaron Sheffield Date: Tue, 6 Mar 2018 10:24:42 -0600 Subject: [PATCH] Added None Checks Fixes #77 Added None checks to avoid an exception if there aren't tasks. Change-Id: I44b4164462fd613b356b520027de5a18e88e1fb9 --- drydock_provisioner/orchestrator/actions/orchestrator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drydock_provisioner/orchestrator/actions/orchestrator.py b/drydock_provisioner/orchestrator/actions/orchestrator.py index e5195c57..485f8641 100644 --- a/drydock_provisioner/orchestrator/actions/orchestrator.py +++ b/drydock_provisioner/orchestrator/actions/orchestrator.py @@ -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,