Skip to content

Commit d0b1fb4

Browse files
author
Peter Van Bouwel
committed
fix: allign with python-driver changes
1 parent 037b93b commit d0b1fb4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

openeogeotrellis/asset_urls.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ class PresignedS3AssetUrls(AssetUrl):
1414
def __init__(self, expiration: int = 24 * 3600):
1515
self._expiration = expiration
1616

17-
def get(self, asset_metadata: dict, asset_name: str, job_id: str, user_id: str) -> str:
17+
def build_url(self, *, asset_metadata: dict, asset_name: str, job_id: str, user_id: str) -> str:
1818
href = asset_metadata.get("href")
1919
if isinstance(href, str) and href.startswith("s3://"):
2020
try:
2121
bucket, key = self.get_bucket_key_from_uri(href)
2222
return self._get_presigned_url_against_proxy(bucket, key, job_id, user_id)
2323
except (ValueError, ProxyException) as e:
2424
logging.debug(f"Falling back to default asset getter because: {e}")
25-
return super().get(asset_metadata, asset_name, job_id, user_id)
25+
return super().build_url(asset_metadata=asset_metadata, asset_name=asset_name, job_id=job_id, user_id=user_id)
2626

2727
@staticmethod
2828
def get_bucket_key_from_uri(s3_uri: str) -> Tuple[str, str]:

tests/test_views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ def retrieve_url_and_set_data(*args, **kwargs):
10031003

10041004
assert res.status_code == expected_code
10051005
if 200 <= expected_code < 300:
1006-
# For succesfull api requests check response data
1006+
# For successfull api requests check response data
10071007
assert res.data == TIFF_DUMMY_DATA
10081008

10091009
@mock.patch(

0 commit comments

Comments
 (0)