def _try_dump(cnf, outpath, otype, fmsg, extra_opts=None):
    """
    :param cnf: Configuration object to print out
    :param outpath: Output file path or None
    :param otype: Output type or None
    :param fmsg: message if it cannot detect otype by 'inpath'
    :param extra_opts: Map object will be given to API.dump as extra options
    """
    if extra_opts is None:
        extra_opts = {}
    try:
        API.dump(cnf, outpath, otype, **extra_opts)
    except API.UnknownFileTypeError:
        _exit_with_output(fmsg % outpath, 1)
    except API.UnknownProcessorTypeError:
        _exit_with_output("Invalid output type '%s'" % otype, 1)
def _try_dump ( cnf , outpath , otype , fmsg , extra_opts = None ) : if extra_opts is None : extra_opts = { } try : API . dump ( cnf , outpath , otype , ** extra_opts ) except API . UnknownFileTypeError : _exit_with_output ( fmsg % outpath , 1 ) except API . UnknownProcessorTypeError : _exit_with_output ( "Invalid output type '%s'" % otype , 1 )
:param cnf: Configuration object to print out
    :param outpath: Output file path or None
    :param otype: Output type or None
    :param fmsg: message if it cannot detect otype by 'inpath'
    :param extra_opts: Map object will be given to API.dump as extra options