Skip to content

Commit d7f5c95

Browse files
IPncorrect validators raise an exception
Co-authored-by: Fabien Castan <[email protected]>
1 parent 59f719d commit d7f5c95

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

meshroom/core/desc/attribute.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ def __init__(self, name, label, description, value, advanced, semantic, group, e
4242
self._isDynamicValue = (self._value is None)
4343
self._valueType = None
4444

45-
self._validators = validators if isinstance(validators, (list, tuple)) else []
45+
if validators is None:
46+
self._validators = []
47+
elif isinstance(validators, (list, tuple)):
48+
self._validators = validators
49+
else:
50+
raise RuntimeError(f"Validators should be of type 'list[AttributeValidator]', the type '{type(validators)}' is not supported.")
4651

4752
def getInstanceType(self):
4853
""" Return the correct Attribute instance corresponding to the description. """

0 commit comments

Comments
 (0)