diff options
author | Patrick Hunt <phunt@apache.org> | 2018-07-18 11:06:45 -0700 |
---|---|---|
committer | Patrick Hunt <phunt@apache.org> | 2018-07-18 11:06:45 -0700 |
commit | 06b9507ab78a1a055b8f467846c15791600b72ee (patch) | |
tree | 92aa4075a03af5e392b6491539b553dc885d35de | |
parent | 065c43f83a432b1fee010d9f0baac8d9a8d67dc1 (diff) | |
download | zookeeper-jenkins-tools.tar.gz |
Fixed URL encoding - seems the new version of Jenkins is more strict and this was failing as a result of recent upgrade of the systemjenkins-tools
Change-Id: I035e4eb753d12da47d7a0a94724f4a8feedd0341
-rw-r--r-- | zk-test-report/zk_test_analyzer.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zk-test-report/zk_test_analyzer.py b/zk-test-report/zk_test_analyzer.py index 7e0823496..1951bd15c 100644 --- a/zk-test-report/zk_test_analyzer.py +++ b/zk-test-report/zk_test_analyzer.py @@ -29,6 +29,7 @@ import os import time import re import requests +import urllib from jinja2 import Template MAX_NUM_OF_BUILDS = 10000 @@ -79,7 +80,7 @@ def generate_report(build_url): """ LOG.info("Analyzing %s", build_url) - report_url = build_url + "testReport/api/json?tree=suites[name,cases[className,name,status]]" + report_url = build_url + "testReport/api/json?tree=suites" + urllib.quote("[name,cases[className,name,status]]") try: response = requests.get(report_url).json() except: @@ -143,7 +144,7 @@ def analyze_build(args): url = url_max_build["url"] excludes = url_max_build["excludes"] - json_response = requests.get(url + "/api/json?tree=builds[number,url]").json() + json_response = requests.get(url + "/api/json?tree=" + urllib.quote("builds[number,url]")).json() if json_response.has_key("builds"): builds = json_response["builds"] LOG.info("Analyzing job: %s", url) |