def safe_call(self, kwargs, args=None):
<EOL>try:<EOL><INDENT>return self._func(**kwargs)<EOL><DEDENT>except Exception as exc:<EOL><INDENT>if args and getattr(args, '<STR_LIT>', False):<EOL><INDENT>raise<EOL><DEDENT>return str(exc)<EOL><DEDENT>
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.