Skip to content

Commit 7da764c

Browse files
committed
Avoid bare except
1 parent 885634b commit 7da764c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mdio/core/grid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def _calculate_live_mask_chunksize(grid: Grid) -> Sequence[int]:
152152
"""
153153
try:
154154
return _calculate_optimal_chunksize(grid.live_mask, INT32_MAX // 4)
155-
except:
155+
except AttributeError:
156156
# Create an empty array with the same shape and dtype as the live mask would have
157157
empty_array = np.empty(grid.shape[:-1], dtype=np.bool_)
158158
return _calculate_optimal_chunksize(empty_array, INT32_MAX // 4)

0 commit comments

Comments
 (0)