From: Tibor Frank Date: Tue, 3 Apr 2018 11:55:35 +0000 (+0200) Subject: CSIT Trending: input files X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=commitdiff_plain;h=57bcac10b47697c496a982ec5e8cd06f8100ac24 CSIT Trending: input files Change-Id: I1570e55186c54718aa388c8ec24bd8d8ed67e0ac Signed-off-by: Tibor Frank --- diff --git a/resources/tools/presentation/input_data_files.py b/resources/tools/presentation/input_data_files.py index 6abb3250e7..f763aa1222 100644 --- a/resources/tools/presentation/input_data_files.py +++ b/resources/tools/presentation/input_data_files.py @@ -81,13 +81,6 @@ def download_data_files(spec): response = get(url, stream=True) code = response.status_code - # temporary workaround, remove when output.log.xml is not needed - if code != codes["OK"] and \ - spec.input["file-name"].endswith(".gz"): - url = '.'.join(url.split('.')[:-1]) + ".log.gz" - response = get(url, stream=True) - code = response.status_code - if code != codes["OK"]: logging.warning( "Jenkins: {0}: {1}.".format(code, responses[code])) @@ -150,8 +143,12 @@ def download_data_files(spec): logging.info("{0}: {1}".format(code, responses[code])) elif spec.input["file-name"].endswith(".gz"): - rename(new_name, new_name[:-3]) - execute_command("gzip --keep {0}".format(new_name[:-3])) + if "docs.fd.io" in url: + execute_command("gzip --decompress --keep --force {0}". + format(new_name)) + else: + rename(new_name, new_name[:-3]) + execute_command("gzip --keep {0}".format(new_name[:-3])) new_name = new_name[:-3] status = "downloaded" logging.info("{0}: {1}".format(code, responses[code]))