Skip to content

Commit

Permalink
#142: catch StopIteration and return InvalidProductError
Browse files Browse the repository at this point in the history
  • Loading branch information
jteulade committed Jun 10, 2024
1 parent 920b8d6 commit 8e001d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eoreader/products/optical/s2_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def _get_res_band_folder(self, band_list: list, pixel_size: float = None) -> dic
s2_bands_folder[band] = next(
self.path.glob(f"{self._get_image_folder()}/{dir_name}")
)
except IndexError:
except (IndexError, StopIteration):
s2_bands_folder[band] = self.path

for band in band_list:
Expand Down

0 comments on commit 8e001d0

Please sign in to comment.