Skip to content

Commit

Permalink
Properly handle incorrect datasets for the VIIRS EDR and MODIS
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrp84 committed Nov 15, 2023
1 parent 23f2e0f commit a0e8386
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions satpy/readers/modis_l3.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def available_datasets(self, configured_datasets=None):
if self.file_type_matches(ds_info["file_type"]) is None:

Check warning on line 116 in satpy/readers/modis_l3.py

View check run for this annotation

Codecov / codecov/patch

satpy/readers/modis_l3.py#L114-L116

Added lines #L114 - L116 were not covered by tests
# this is not the file type for this dataset
yield None, ds_info
continue
yield file_key in ds_dict.keys(), ds_info

Check warning on line 120 in satpy/readers/modis_l3.py

View check run for this annotation

Codecov / codecov/patch

satpy/readers/modis_l3.py#L118-L120

Added lines #L118 - L120 were not covered by tests

yield from self._dynamic_variables_from_file(handled_var_names)
Expand Down
1 change: 1 addition & 0 deletions satpy/readers/viirs_edr.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def available_datasets(self, configured_datasets=None):
if self.file_type_matches(ds_info["file_type"]) is None:
# this is not the file type for this dataset
yield None, ds_info
continue
yield file_key in self.nc, ds_info

yield from self._dynamic_variables_from_file(handled_var_names)
Expand Down

0 comments on commit a0e8386

Please sign in to comment.