From 57bcac10b47697c496a982ec5e8cd06f8100ac24 Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Tue, 3 Apr 2018 13:55:35 +0200 Subject: CSIT Trending: input files Change-Id: I1570e55186c54718aa388c8ec24bd8d8ed67e0ac Signed-off-by: Tibor Frank --- resources/tools/presentation/input_data_files.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'resources/tools/presentation') 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])) -- cgit 1.2.3-korg