Guest User

Untitled

a guest
Nov 19th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. diff --git a/jenkinsapi/job.py b/jenkinsapi/job.py
  2. index 280cf93..20c6932 100644
  3. --- a/jenkinsapi/job.py
  4. +++ b/jenkinsapi/job.py
  5. @@ -90,7 +90,7 @@ class Job(JenkinsBase, MutableJenkinsThing):
  6.  
  7. def poll(self, tree=None):
  8. data = super(Job, self).poll(tree=tree)
  9. - if not tree:
  10. + if not tree and self.jenkins.lazy is False:
  11. self._data = self._add_missing_builds(self._data)
  12. else:
  13. return data
  14. @@ -392,7 +392,7 @@ class Job(JenkinsBase, MutableJenkinsThing):
  15. def get_build(self, buildnumber):
  16. assert isinstance(buildnumber, int)
  17. try:
  18. - url = self.get_build_dict()[buildnumber]
  19. + url = self.url + str(buildnumber)
  20. return Build(url, buildnumber, job=self)
  21. except KeyError:
  22. raise NotFound('Build #%s not found' % buildnumber)
Add Comment
Please, Sign In to add comment