Exemplo n.º 1
0
def main():
    """Entry point."""
    parser = create_argument_parser()
    args = vars(parser.parse_args())

    # dispatch execution depending on what command was issued
    command = args.pop('command')
    command_handler = globals()['handle_%s' % command]
    with error_handler(command):
        check_repo_arg(args)
        return command_handler(**args)
Exemplo n.º 2
0
def argparser():
    """Provide :class:`argparse.ArgumentParser` for use by tests."""
    return create_argument_parser()