def hasattr_silent(object, name):
    """
        Calls hasttr() with the given parameters and preserves the legacy (pre-Python 3.2)
        functionality of silently catching exceptions.

        Returns the result of hasatter() or False if an exception was raised.
    """
    try:
        if not object:
            return False
        return hasattr(object, name)
    except AttributeError:
        return False
