[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
This commit is contained in:
Bryan Strassner 2018-06-29 18:12:21 -05:00
parent bb697212a9
commit 4c6cce57ad
1 changed files with 1 additions and 1 deletions

View File

@ -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 "