Skip to content

Commit

Permalink
Fix #142: catch StopIteration and return InvalidProductError
Browse files Browse the repository at this point in the history
  • Loading branch information
jteulade committed May 21, 2024
1 parent 2da8a60 commit 5fd6af2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 0.21.2 (2024-mm-dd)

- FIX: `Sentinel-2` product with StopIteration error ([#142](https://github.com/sertit/eoreader/issues/142))
- FIX: Fix `Maxar` product with `QB02` satellite ID ([#140](https://github.com/sertit/eoreader/issues/140))
- ENH: `to_str` and `to_band`: add a `as_list` argument defaulting to `True`. When set as False, return a str from `to_str` and a band from `to_band` ([#138](https://github.com/sertit/eoreader/issues/138)). Thanks @jsetty!
- FIX: Fix issue with geocoding with unzipped `Sentinel-3 OLCI` product ([#137](https://github.com/sertit/eoreader/issues/137))
Expand Down
2 changes: 1 addition & 1 deletion eoreader/products/optical/s2_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def _get_name_constellation_specific(self) -> str:
next(self.path.glob("**/tileInfo.json")), print_file=False
)
name = tile_info["productName"]
except json.JSONDecodeError:
except (json.JSONDecodeError, StopIteration):
raise InvalidProductError(
f"Corrupted metadata and bad filename for {self.path}! "
f"Impossible to process this product."
Expand Down

0 comments on commit 5fd6af2

Please sign in to comment.