Show More
@@ -457,8 +457,13 class TraitType(object): | |||||
457 | return value |
|
457 | return value | |
458 | if hasattr(self, 'validate'): |
|
458 | if hasattr(self, 'validate'): | |
459 | value = self.validate(obj, value) |
|
459 | value = self.validate(obj, value) | |
460 | if hasattr(obj, '_%s_validate' % self.name): |
|
460 | try: | |
461 |
|
|
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 | return value |
|
467 | return value | |
463 |
|
468 | |||
464 | def __or__(self, other): |
|
469 | def __or__(self, other): |
General Comments 0
You need to be logged in to leave comments.
Login now