def ignore_exceptions(f):
    """Decorator catches and ignores any exceptions raised by this function."""
    @functools.wraps(f)
    def wrapped(*args, **kwargs):
        try:
            return f(*args, **kwargs)
        except:
            logging.exception("Ignoring exception in %r", f)
    return wrapped