We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58db8f4 commit b78eaeeCopy full SHA for b78eaee
1 file changed
jenkins_cli/cli.py
@@ -175,8 +175,8 @@ def info(self, args):
175
job_info = self.jenkins.get_job_info(job_name, 1)
176
if not job_info:
177
job_info = {}
178
- last_build = job_info.get('lastBuild', {})
179
- last_success_build = job_info.get('lastSuccessfulBuild', {})
+ last_build = job_info.get('lastBuild') or {}
+ last_success_build = job_info.get('lastSuccessfulBuild') or {}
180
xml = self.jenkins.get_job_config(job_name)
181
root = ElementTree.fromstring(xml.encode('utf-8'))
182
scm_name, branch_node = self._get_scm_name_and_node(root)
0 commit comments