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
This commit is contained in:
James E. Blair 2015-04-15 15:43:14 -07:00
parent ddd600368a
commit 83ffffd94a

View File

@ -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):