"""
import re
-import logging
from os import rename, mkdir
from os.path import join
file_name = spec.input["file-name"]
full_name = spec.input["download-path"]. \
format(job=job, build=build["build"], filename=file_name)
- if job.startswith("intel-dnv-"):
- full_name = ""
- url = "{0}/{1}".format(url, full_name)
+ if not job.startswith("intel-dnv-"):
+ url = "{0}/{1}".format(url, full_name)
new_name = join(spec.environment["paths"]["DIR[WORKING,DATA]"],
"{job}{sep}{build}{sep}{name}".
format(job=job, sep=SEPARATOR, build=build["build"],
name=file_name))
- logging.info(new_name)
-
# Download the file from the defined source (Jenkins, logs.fd.io):
success = _download_file(url, new_name, log)
- logging.info("{}: {}".format(url, success))
-
if success and new_name.endswith(".zip"):
if not is_zipfile(new_name):
success = False