def safe_call(self, kwargs, args=None):
        """
        Call the underlying function safely, given a set of keyword
        arguments.  If successful, the function return value (likely
        None) will be returned.  If the underlying function raises an
        exception, the return value will be the exception message,
        unless an argparse Namespace object defining a 'debug'
        attribute of True is provided; in this case, the exception
        will be re-raised.

        :param kwargs: A dictionary of keyword arguments to pass to
                       the underlying function.
        :param args: If provided, this should be a Namespace object
                     with a 'debug' attribute set to a boolean value.

        :returns: The function return value, or the string value of
                  the exception raised by the function.
        """

        # Now let's call the function
        try:
            return self._func(**kwargs)
        except Exception as exc:
            if args and getattr(args, 'debug', False):
                raise
            return str(exc)