From e8fa3ac7894f9153154700c890f1e0e24352012b Mon Sep 17 00:00:00 2001 From: Simon Proud Date: Tue, 17 Sep 2024 17:02:11 +0200 Subject: [PATCH] Add error handling for incorrect data load. --- satpy/readers/oli_tirs_l1_tif.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/satpy/readers/oli_tirs_l1_tif.py b/satpy/readers/oli_tirs_l1_tif.py index 3c22476869..d143db1844 100644 --- a/satpy/readers/oli_tirs_l1_tif.py +++ b/satpy/readers/oli_tirs_l1_tif.py @@ -95,7 +95,7 @@ def __init__(self, filename, filename_info, filetype_info, mda, **kwargs): def get_dataset(self, key, info): """Load a dataset.""" if self.channel != key["name"]: - return + raise ValueError(f"Requested channel {key['name']} does not match the reader channel {self.channel}") logger.debug("Reading %s.", key["name"])