Closed btel closed 12 years ago
Assertion base.HasAttribute catches exceptions making it impossible to debug the components depending on it.For example, if the attribute is a property and getter or setter has a bug that generates an exception, the exception is silently passed.
This behaviour is probably due to the way that hasattr is implemented (it uses getattr and catches the exception: http://docs.python.org/library/functions.html#hasattr).
hasattr
The call to hasattr should be replaced by getattr and try... except... block
getattr
try... except...
hell yeah
Assertion base.HasAttribute catches exceptions making it impossible to debug the components depending on it.For example, if the attribute is a property and getter or setter has a bug that generates an exception, the exception is silently passed.
This behaviour is probably due to the way that
hasattr
is implemented (it uses getattr and catches the exception: http://docs.python.org/library/functions.html#hasattr).The call to
hasattr
should be replaced bygetattr
andtry... except...
block