Do not try to get new job results when none available
When the new Zuul tenant is deployed, it can be a situation that none job has been done, so the logscraper cat get an infinity loop. Change-Id: Id0125f52d4cf2190bfa2aea7deec75fd6b9ab06a
This commit is contained in:
@@ -384,6 +384,9 @@ def get_builds(zuul_url, insecure, job_name):
|
|||||||
logging.info("Getting job results %s", url)
|
logging.info("Getting job results %s", url)
|
||||||
jobs_result = requests_get_json(url, verify=insecure)
|
jobs_result = requests_get_json(url, verify=insecure)
|
||||||
|
|
||||||
|
if not jobs_result:
|
||||||
|
return iter([])
|
||||||
|
|
||||||
for job in jobs_result:
|
for job in jobs_result:
|
||||||
# It is important here to check we didn't yield builds twice,
|
# It is important here to check we didn't yield builds twice,
|
||||||
# as this can happen when using skip if new build get reported
|
# as this can happen when using skip if new build get reported
|
||||||
|
|||||||
Reference in New Issue
Block a user