From 83ffffd94aa87d35f9b55c4f0342a80f66ae8626 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 15 Apr 2015 15:43:14 -0700 Subject: [PATCH] Don't try to delete nonexistent jenkins nodes If a node was never added to jenkins (ie, it has a nodename of None), then don't try to delete it. The jenkins python lib will throw an exception in that case, and there is nothing to actually do. Change-Id: I457f52b96845174414635cb0b5fa73652e910c9c --- nodepool/nodepool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodepool/nodepool.py b/nodepool/nodepool.py index fdca19dcc..4b9c5ba9c 100644 --- a/nodepool/nodepool.py +++ b/nodepool/nodepool.py @@ -2074,7 +2074,7 @@ class NodePool(threading.Thread): image_name = None manager = self.getProviderManager(provider) - if target.jenkins_url: + if target.jenkins_url and (node.nodename is not None): jenkins = self.getJenkinsManager(target) jenkins_name = node.nodename if jenkins.nodeExists(jenkins_name):