예제 #1
0
def _main(base, args, cli_class, option_parser):
    """Run the dnf program from a command line interface."""

    # our core object for the cli
    base._logging._presetup()
    cli = cli_class(base)

    # do our cli parsing and config file setup
    # also sanity check the things being passed on the cli
    try:
        cli.configure(list(map(ucd, args)), option_parser())
    except (IOError, OSError) as e:
        return ex_IOError(e)

    return cli_run(cli, base)
예제 #2
0
def _main(base, args, cli_class, option_parser):
    """Run the dnf program from a command line interface."""

    # our core object for the cli
    base._logging._presetup()
    cli = cli_class(base)

    # do our cli parsing and config file setup
    # also sanity check the things being passed on the cli
    try:
        cli.configure(list(map(ucd, args)), option_parser())
    except (IOError, OSError) as e:
        return ex_IOError(e)

    return cli_run(cli, base)
예제 #3
0
파일: main.py 프로젝트: msehnout/dnf-2.7.5
def _main(base, args, cli_class, option_parser):
    """Run the dnf program from a command line interface."""

    dnf.i18n.setup_stdout()

    # our core object for the cli
    base._logging._presetup()
    logger.info(dnssec.any_msg("Start!"))
    Base.check_imported_keys_validity()
    cli = cli_class(base)

    # do our cli parsing and config file setup
    # also sanity check the things being passed on the cli
    try:
        cli.configure(list(map(ucd, args)), option_parser())
    except (IOError, OSError) as e:
        return ex_IOError(e)

    return cli_run(cli, base)