diff options
author | Tibor Frank <tifrank@cisco.com> | 2018-04-03 13:55:35 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2018-04-03 13:55:35 +0200 |
commit | 57bcac10b47697c496a982ec5e8cd06f8100ac24 (patch) | |
tree | 2c79762e9bc68c348c4912eb2d481cbdd66bea33 /resources/tools | |
parent | c623ad8042127fcb4bbd3c9ffb646f40371b7510 (diff) |
CSIT Trending: input files
Change-Id: I1570e55186c54718aa388c8ec24bd8d8ed67e0ac
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools')
-rw-r--r-- | resources/tools/presentation/input_data_files.py | 15 |
1 files changed, 6 insertions, 9 deletions
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])) |