Show More
@@ -457,8 +457,13 b' class TraitType(object):' | |||
|
457 | 457 | return value |
|
458 | 458 | if hasattr(self, 'validate'): |
|
459 | 459 | value = self.validate(obj, value) |
|
460 | if hasattr(obj, '_%s_validate' % self.name): | |
|
461 |
|
|
|
460 | try: | |
|
461 | obj_validate = getattr(obj, '_%s_validate' % self.name) | |
|
462 | except (AttributeError, RuntimeError): | |
|
463 | # Qt mixins raise RuntimeError on missing attrs accessed before __init__ | |
|
464 | pass | |
|
465 | else: | |
|
466 | value = obj_validate(value, self) | |
|
462 | 467 | return value |
|
463 | 468 | |
|
464 | 469 | def __or__(self, other): |
General Comments 0
You need to be logged in to leave comments.
Login now