From 902d8d58784aaac6d12ae6abbb7c5bf49d77f0cb Mon Sep 17 00:00:00 2001 From: jteulade Date: Mon, 10 Jun 2024 15:34:27 +0200 Subject: [PATCH] #156: catch InvalidProductError when we try to get cloud_coverage property --- eoreader/stac/stac_extensions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eoreader/stac/stac_extensions.py b/eoreader/stac/stac_extensions.py index e8ae9d11..f7d4e242 100644 --- a/eoreader/stac/stac_extensions.py +++ b/eoreader/stac/stac_extensions.py @@ -56,6 +56,7 @@ get_media_type, repr_multiline_str, ) +from eoreader.exceptions import InvalidProductError class EoExt: @@ -77,7 +78,7 @@ def __init__(self, prod, **kwargs): try: if prod._has_cloud_cover: self.cloud_cover = prod.get_cloud_cover() - except AttributeError: + except (AttributeError, InvalidProductError): pass self.bands = prod.bands