Skip to content

Commit

Permalink
replace assert with a TypeError in RegionOfInterest
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Jan 30, 2024
1 parent c5e3a93 commit b3b58d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neo/core/regionofinterest.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def _get_obj(self):
return self.image_sequence

def _set_obj(self, value):
assert isinstance(value, ImageSequence)
if not isinstance(value, ImageSequence):
raise TypeError(f"Value must be ImageSequence, not of type: {type(value)}")
self.image_sequence = value

obj = property(fget=_get_obj, fset=_set_obj)
Expand Down

0 comments on commit b3b58d6

Please sign in to comment.