This is an automated email from the ASF dual-hosted git repository.
marcoabreu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet-ci.git
The following commit(s) were added to refs/heads/master by this push:
new 3e120f5 improve error handling (#11)
3e120f5 is described below
commit 3e120f5d2394d1c28b42bf6e14baf4fdbee3f02e
Author: Nihal Harish <[email protected]>
AuthorDate: Tue Oct 8 16:16:57 2019 -0700
improve error handling (#11)
---
services/jenkins-run-statistics/jenkins_utils.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/services/jenkins-run-statistics/jenkins_utils.py
b/services/jenkins-run-statistics/jenkins_utils.py
index 6f06e6f..c38ad13 100644
--- a/services/jenkins-run-statistics/jenkins_utils.py
+++ b/services/jenkins-run-statistics/jenkins_utils.py
@@ -244,7 +244,11 @@ def _retrieve_jenkins_jobs(jenkins_url):
:return: Array of JenkinsJobs
"""
session = XMLSession()
- r = session.get(url=jenkins_url + JENKINS_ALL_RUNS_API)
+ try:
+ r = session.get(url=jenkins_url + JENKINS_ALL_RUNS_API)
+ r.raise_for_status()
+ except requests.exceptions.HTTPError as err:
+ logging.error(err)
# <Project activity="Sleeping" lastBuildStatus="Success"
lastBuildLabel="756"
#
webUrl="http://jenkins.mxnet-ci.amazon-ml.com/job/Broken_Link_Checker_Pipeline/"
# name="Broken_Link_Checker_Pipeline"
lastBuildTime="2018-11-30T01:12:59Z"/>