diff options
| author | Matt Rendina <rendinam@users.noreply.github.com> | 2019-11-18 14:54:12 -0500 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-18 14:54:12 -0500 | 
| commit | 4938db967cd03ac9e40e7764269717025dc9af2d (patch) | |
| tree | 8c01462f5a589300284a19d067fe37df6598a19a /jwstdp/utils | |
| parent | 33fde33643cec5633e5efbcd6b060bb3e96f6957 (diff) | |
| download | astroconda-releases-4938db967cd03ac9e40e7764269717025dc9af2d.tar.gz | |
Correct prefix list availability (#102)
Diffstat (limited to 'jwstdp/utils')
| -rwxr-xr-x | jwstdp/utils/jwst_delivery_prep | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/jwstdp/utils/jwst_delivery_prep b/jwstdp/utils/jwst_delivery_prep index 6fe869b..742adec 100755 --- a/jwstdp/utils/jwst_delivery_prep +++ b/jwstdp/utils/jwst_delivery_prep @@ -29,7 +29,7 @@ def modify_dep(line, text):      return(line) -def get_artifact_names(url): +def get_artifact_names(url, prefixes):      '''Retrieve list of all available artifacts in the target artifactory      repository.'''      names = [] @@ -38,7 +38,7 @@ def get_artifact_names(url):      payload = result.readlines()      for line in payload:          line = str(line.decode()) -        for prefix in artifact_prefixes: +        for prefix in prefixes:              if prefix in line:                  mat = re.search('(?<=").*(?=\")', line)                  names.append(mat.group(0)) @@ -161,7 +161,9 @@ def main():      config_map = []      from collections import namedtuple      confset = namedtuple('confset', ['config', 'os']) -    artifacts = get_artifact_names(f'{art_url_base}/{art_repo}') +    artifacts = get_artifact_names( +            f'{art_url_base}/{art_repo}', +            artifact_prefixes)      # Download only the available artifacts that correspond to the      # requested build name into new release dir.   | 
