diff --git a/planner/utilities.py b/planner/utilities.py index 69ce6db..10a92a4 100644 --- a/planner/utilities.py +++ b/planner/utilities.py @@ -81,8 +81,8 @@ def client(): def s3_path(path): - if path.startswith('http'): - bucket = PKGSTORE_BUCKET + bucket = PKGSTORE_BUCKET + if path.startswith('http') and '/{}/'.format(bucket) in path: parsed_url = urllib.parse.urlparse(path) path = parsed_url.path.lstrip('/') if path.startswith(bucket):