Handle new master naming in Jenkins post v2.307.

Closes-Bug: #1943402
Change-Id: I6789f6af325f2c104adb91ac7159e3734f71029f
This commit is contained in:
Michael Still 2021-12-28 17:02:57 +11:00
parent dc2b9447de
commit d1e4696495

View File

@ -1499,7 +1499,7 @@ class Jenkins(object):
for node in nodes:
# the name returned is not the name to lookup when
# dealing with master :/
if node['name'] == 'master':
if node['name'] in ['master', 'Built-In Node']:
node_name = '(master)'
else:
node_name = node['name']
@ -1554,6 +1554,9 @@ class Jenkins(object):
:param depth: JSON depth, ``int``
:returns: Dictionary of node info, ``dict``
'''
if name == 'Built-In Node':
name = '(master)'
try:
response = self.jenkins_open(requests.Request(
'GET', self._build_url(NODE_INFO, locals())