##// END OF EJS Templates
Merge pull request #8099 from minrk/catch-runtime-trait...
Thomas Kluyver -
r20772:8f81bdac merge
parent child Browse files
Show More
@@ -457,8 +457,13 b' 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 value = getattr(obj, '_%s_validate' % self.name)(value, self)
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