code: def _safe_hasattr(o, attr):
      
      try:
          has = hasattr(o, attr)
      except: # pragma: no cover
          has = False
          msg.err("_safe_hasattr: {}.{}".format(o, attr), 2)
          pass
      return has
docs: 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.