Skip to content

Commit

Permalink
Remove unnecessary IndexError
Browse files Browse the repository at this point in the history
  • Loading branch information
lahtinep committed Mar 7, 2024
1 parent f1bc699 commit f6594cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion satpy/readers/netcdf_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def get_data_as_xarray(variable):
try:
arr = xr.DataArray(
variable[:], dims=variable.dimensions, attrs=attrs, name=variable.name)
except (ValueError, IndexError):
except ValueError:

Check warning on line 386 in satpy/readers/netcdf_utils.py

View check run for this annotation

Codecov / codecov/patch

satpy/readers/netcdf_utils.py#L386

Added line #L386 was not covered by tests
# Handle scalars for h5netcdf backend
arr = xr.DataArray(

Check warning on line 388 in satpy/readers/netcdf_utils.py

View check run for this annotation

Codecov / codecov/patch

satpy/readers/netcdf_utils.py#L388

Added line #L388 was not covered by tests
variable.__array__(), dims=variable.dimensions, attrs=attrs, name=variable.name)
Expand Down

0 comments on commit f6594cf

Please sign in to comment.