projects
/
tools
/
python-jenkinsapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95160c8
)
Jobs without the first build can throw error
author
Vyacheslav Linnik
<vyacheslav.linnik@gmail.com>
Fri, 22 Nov 2013 04:21:54 +0000
(08:21 +0400)
committer
Vyacheslav Linnik
<vyacheslav.linnik@gmail.com>
Fri, 22 Nov 2013 04:21:54 +0000
(08:21 +0400)
jenkinsapi/job.py
patch
|
blob
|
history
diff --git
a/jenkinsapi/job.py
b/jenkinsapi/job.py
index 29c1b705340a237ad229ec02ad6bcdbcf424b335..d5e1b6931e17e0606047d955bb6efee5bbd36a16 100644
(file)
--- a/
jenkinsapi/job.py
+++ b/
jenkinsapi/job.py
@@
-87,7
+87,7
@@
class Job(JenkinsBase, MutableJenkinsThing):
Jenkins API loads the first 100 builds and thus may not contain all builds
information. This method checks if all builds are loaded in the data object
and updates it with the missing builds if needed.'''
- if not
data.get("builds"
):
+ if not
(data.get("builds") and data.get("firstBuild")
):
return data
# do not call _buildid_for_type here: it would poll and do an infinite loop
oldest_loaded_build_number = data["builds"][-1]["number"]