def safe_getattr(object, name, default):
    " Like getattr but return default upon any Exception or any OutcomeException.\n\n    Attribute access can potentially fail for 'evil' Python objects.\n    See issue #214.\n    It catches OutcomeException because of #2490 (issue #580), new outcomes are derived from BaseException\n    instead of Exception (for more details check #2707)\n    "
    try:
        return getattr(object, name, default)
    except TEST_OUTCOME:
        return default
Like getattr but return default upon any Exception or any OutcomeException.

Attribute access can potentially fail for 'evil' Python objects.
See issue #214.
It catches OutcomeException because of #2490 (issue #580), new outcomes are derived from BaseException
instead of Exception (for more details check #2707)
def safe_getattr(object, name, default):
    " Like getattr but return default upon any Exception or any OutcomeException.\n\n    Attribute access can potentially fail for 'evil' Python objects.\n    See issue #214.\n    It catches OutcomeException because of #2490 (issue #580), new outcomes are derived from BaseException\n    instead of Exception (for more details check #2707)\n    "
    try:
        return getattr(object, name, default)
    except TEST_OUTCOME:
        return default