Skip to content

Commit

Permalink
FIX: Handle wrongly recognized Planet products because of the recursi…
Browse files Browse the repository at this point in the history
…ve nested mtd in the Reader #169
  • Loading branch information
remi-braun committed Jul 15, 2024
1 parent bfff73a commit b677300
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- FIX: Add missing `pystac[validation]` in setup.py
- FIX: Handle RCM and RS2 products that doesn't bundle their extent in a KML file ([#155](https://github.com/sertit/eoreader/issues/155))
- FIX: Fix error in looking for bands in Sentinel-2 L1C archived products ([#168](https://github.com/sertit/eoreader/issues/168))
- FIX: Handle wrongly recognized Planet products because of the recursive nested mtd in the Reader ([#169](https://github.com/sertit/eoreader/issues/169))
- OPTIM: Search correctly nested metadata in the Reader (without accidentally using a recursive glob)
- CI: Fix S3 endpoint management with `sertit>=1.37`

Expand Down
3 changes: 3 additions & 0 deletions eoreader/products/optical/pla_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@ def _get_stack_path(self, as_list: bool = False) -> Union[str, list]:
"Analytic", "tif", invalid_lookahead="udm", as_list=as_list
)

if len(stack_path) < 1:
raise InvalidProductError("This is not a Planet Product.")

return stack_path

def _to_reflectance(
Expand Down

0 comments on commit b677300

Please sign in to comment.