diff options
author | Aleksey Maksimov <ctpeko3a@gmail.com> | 2014-05-02 00:31:54 +0800 |
---|---|---|
committer | Aleksey Maksimov <ctpeko3a@gmail.com> | 2014-05-02 00:31:54 +0800 |
commit | ea630a8b4b5da6a300f0fcb06df55aafd42c0528 (patch) | |
tree | 89f2cc68ca5cc502cf17a0ee122e626867811180 /jenkinsapi | |
parent | a9cb6563b72ec459bf774ff2c5b63ff31bf1bca8 (diff) | |
download | python-jenkinsapi-ea630a8b4b5da6a300f0fcb06df55aafd42c0528.tar.gz python-jenkinsapi-ea630a8b4b5da6a300f0fcb06df55aafd42c0528.tar.bz2 python-jenkinsapi-ea630a8b4b5da6a300f0fcb06df55aafd42c0528.zip |
Added better test to job._add_missing_builds()
Diffstat (limited to 'jenkinsapi')
-rw-r--r-- | jenkinsapi/job.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jenkinsapi/job.py b/jenkinsapi/job.py index 6b19294..e468995 100644 --- a/jenkinsapi/job.py +++ b/jenkinsapi/job.py @@ -105,7 +105,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") and data.get("firstBuild")): + if not data.get("builds"): 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"] @@ -527,7 +527,7 @@ class Job(JenkinsBase, MutableJenkinsThing): try: for j in self._data['downstreamProjects']: downstream_jobs.append( - self.get_jenkins_obj().get_job(j['name'])) + self.get_jenkins_obj()[j['name']]) except KeyError: return [] return downstream_jobs |