diff options
author | Riku Voipio <riku.voipio@linaro.org> | 2020-10-23 11:55:29 +0300 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2020-10-29 12:03:57 +0000 |
commit | 59536fd627f91d881980e19113159c1bfa6ba1cf (patch) | |
tree | 8fe66f4e12d22cd715623174a257f4e2dc466493 /license_protected_downloads/common.py | |
parent | 54ee55949a84135ad0c08e92338204094ccef2e7 (diff) |
llp: fix links to deeper paths
With the original code, the re match is:
('https://snapshots.linaro.org/openembedded/schneider/linaro-dunfell-4.19/soca9', 'latest/dip', 'MD5SUMS.txt')
Correct it by matching only exactly to "latest"
('https://snapshots.linaro.org/openembedded/schneider/linaro-dunfell-4.19/soca9', 'latest', 'dip/MD5SUMS.txt')
Hence reconstructing the url will succeed again
fixes LSS-1804
Change-Id: I73bb5b6c6655e0f3590facc3e4302dc7aadb9294
Reviewed-on: https://review.linaro.org/c/infrastructure/linaro-license-protection/+/36676
Reviewed-by: Benjamin Copeland <ben.copeland@linaro.org>
Diffstat (limited to 'license_protected_downloads/common.py')
-rw-r--r-- | license_protected_downloads/common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/license_protected_downloads/common.py b/license_protected_downloads/common.py index 1398d25..ad2b396 100644 --- a/license_protected_downloads/common.py +++ b/license_protected_downloads/common.py @@ -162,7 +162,7 @@ def _sort_artifacts(a, b): def s3_replace_latest(url, bucket=None): ''' read .s3_linked_from file to find out the original directory to read from ''' - urlreg = r"^(?P<prefix>.*)/(?P<vers>latest.*)/(?P<target>.*)$" + urlreg = r"^(?P<prefix>.*)/(?P<vers>latest)/(?P<target>.*)$" m = re.search(urlreg, url) if not m: return url |