From 4c6cce57adb8a8b021ffde61ec5ecb93c0217a3f Mon Sep 17 00:00:00 2001 From: Bryan Strassner Date: Fri, 29 Jun 2018 18:12:21 -0500 Subject: [PATCH] [Fix] Shipyard handle set Key Error A KeyError was not being caught by the ValueError exception handler when removing a node from a list of successes. This provides a safer exception handler. Change-Id: I3f7b5146009f4f05ee893919a73e41e182dea9f9 --- .../shipyard_airflow/shipyard_airflow/plugins/drydock_nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/shipyard_airflow/shipyard_airflow/plugins/drydock_nodes.py b/src/bin/shipyard_airflow/shipyard_airflow/plugins/drydock_nodes.py index 40569667..0e7922c7 100644 --- a/src/bin/shipyard_airflow/shipyard_airflow/plugins/drydock_nodes.py +++ b/src/bin/shipyard_airflow/shipyard_airflow/plugins/drydock_nodes.py @@ -176,7 +176,7 @@ class DrydockNodesOperator(DrydockBaseOperator): LOG.info("Node %s failed to join the Kubernetes cluster or was" " not timely enough", node) task_result.successes.remove(node) - except ValueError: + except (ValueError, KeyError): # This node is not joined, but was not one that we were # looking for either. LOG.info("%s failed to join Kubernetes, but was not in the "