Skip to content

Commit b3b58d6

Browse files
committed
replace assert with a TypeError in RegionOfInterest
1 parent c5e3a93 commit b3b58d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

neo/core/regionofinterest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def _get_obj(self):
2828
return self.image_sequence
2929

3030
def _set_obj(self, value):
31-
assert isinstance(value, ImageSequence)
31+
if not isinstance(value, ImageSequence):
32+
raise TypeError(f"Value must be ImageSequence, not of type: {type(value)}")
3233
self.image_sequence = value
3334

3435
obj = property(fget=_get_obj, fset=_set_obj)

0 commit comments

Comments
 (0)