def _safe_hasattr(o, attr):
    """Returns True if `o` has the specified attribute. Takes edge cases into
    account where packages didn't intend to be used like acorn uses them.
    """
    try:
        has = hasattr(o, attr)
    except: # pragma: no cover
        has = False
        msg.err("_safe_hasattr: {}.{}".format(o, attr), 2)
        pass
    return has
Returns True if `o` has the specified attribute. Takes edge cases into
    account where packages didn't intend to be used like acorn uses them.