aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelley Spoon <kelley.spoon@linaro.org>2020-03-05 18:52:55 +0000
committerKelley Spoon <kelley.spoon@linaro.org>2020-03-05 19:27:28 +0000
commit0aa4f0c9c10cea76b6bfff2de13519f4b73d8ac7 (patch)
treef7df1cecdda3b7ec1285e69dd74b8045592e907b
parent5e3b275f9510a7bac236460cf418cc89985d90e7 (diff)
downloadlinaro-license-protection-0aa4f0c9c10cea76b6bfff2de13519f4b73d8ac7.tar.gz
Revert "llp: make delete for link_latest aware of bucket versioning"
This reverts commit 526f40cb9bc4062f9272077a53642ed27fdac18c. Reason for revert: This change is causing a 403 from AWS s3 API when users attempt to run link_latest. It's possible there is a permissions problem on the credentials being used. Change-Id: I9ace60d0fcde998a05b7ae74c43d4c76cca42d4d Reviewed-on: https://review.linaro.org/c/infrastructure/linaro-license-protection/+/34491 Reviewed-by: Kelley Spoon <kelley.spoon@linaro.org>
-rw-r--r--license_protected_downloads/api/v3.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/license_protected_downloads/api/v3.py b/license_protected_downloads/api/v3.py
index fbb1621..37b8a1a 100644
--- a/license_protected_downloads/api/v3.py
+++ b/license_protected_downloads/api/v3.py
@@ -75,14 +75,8 @@ class LatestLinkResource(PublishResource):
raise HttpResponseError('Invalid link name', 401)
dst = os.path.join(os.path.dirname(path), link_name)
-
- v = b.get_versioning_status()
- if v['Versioning']:
- keys = b.list_versions(dst)
- else:
- keys = b.list(dst)
+ keys = b.list(dst)
b.delete_keys(keys)
-
for k in items:
newkeyname = k.name.replace(path, dst)
b.copy_key(newkeyname, k.bucket.name, k.name)