From d1e469649574883bc531d35fb3aee207f45c15a5 Mon Sep 17 00:00:00 2001 From: Michael Still Date: Tue, 28 Dec 2021 17:02:57 +1100 Subject: [PATCH] Handle new master naming in Jenkins post v2.307. Closes-Bug: #1943402 Change-Id: I6789f6af325f2c104adb91ac7159e3734f71029f --- jenkins/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jenkins/__init__.py b/jenkins/__init__.py index 764db4f..7ebdbea 100755 --- a/jenkins/__init__.py +++ b/jenkins/__init__.py @@ -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())