From 1d230a98297b64ded37fae75439f1fde16d52581 Mon Sep 17 00:00:00 2001 From: jteulade Date: Thu, 27 Jun 2024 13:28:52 +0200 Subject: [PATCH] #161: return an error if SPECTRAL_PROCESSING not found in metadata --- eoreader/products/optical/spot45_product.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eoreader/products/optical/spot45_product.py b/eoreader/products/optical/spot45_product.py index 2939fcb7..e031f4bf 100644 --- a/eoreader/products/optical/spot45_product.py +++ b/eoreader/products/optical/spot45_product.py @@ -233,6 +233,8 @@ def _set_band_combi(self) -> None: """ root, _ = self.read_mtd() band_combi = root.findtext(".//SPECTRAL_PROCESSING") + if not band_combi: + raise InvalidProductError("SPECTRAL_PROCESSING not found in metadata!") if self.constellation == Constellation.SPOT4: self.band_combi = Spot4BandCombination.from_value(band_combi) else: