def safe_call(func, *args, **kwargs):
try:<EOL><INDENT>return None, func(*args, **kwargs)<EOL><DEDENT>except Exception:  <EOL><INDENT>return traceback.format_exc(), None<EOL><DEDENT>
Call `func(*args, **kwargs)` but NEVER raise an exception.

Useful in situations such as inside exception handlers where calls to
`logging.error` try to send email, but the SMTP server isn't always
availalbe and you don't want your exception handler blowing up.