def do_create(args, config):
    name = args.name
    if args.ships is not None:
        ships = args.ships.split(' ')
    else:
        ships = ["AAAAA", "BBBB", "CCC", "DD", "DD", "SSS", "SSS"]

    url = config.get('DEFAULT', 'url')
    key_file = config.get('DEFAULT', 'key_file')

    client = BattleshipClient(base_url=url, keyfile=key_file, wait=args.wait)
    client.create(name=name, ships=ships)
Пример #2
0
def do_create(args, config):
    name = args.name
    if args.ships is not None:
        ships = args.ships.split(' ')
    else:
        ships = ["AAAAA", "BBBB", "CCC", "DD", "DD", "SSS", "SSS"]

    url = config.get('DEFAULT', 'url')
    key_file = config.get('DEFAULT', 'key_file')

    client = BattleshipClient(base_url=url, keyfile=key_file, wait=args.wait)
    client.create(name=name, ships=ships)
Пример #3
0
def do_create(args, config):
    name = args.name
    if args.ships is not None:
        ships = args.ships.split(' ')
    else:
        ships = None

    url = config.get('DEFAULT', 'url')
    key_file = config.get('DEFAULT', 'key_file')

    client = BattleshipClient(base_url=url, keyfile=key_file)
    client.create(name=name, ships=ships)

    if args.wait:
        client.wait_for_commit()
Пример #4
0
def do_create(args, config):
    name = args.name
    if args.ships is not None:
        ships = args.ships.split(' ')
    else:
        ships = None

    url = config.get('DEFAULT', 'url')
    key_file = config.get('DEFAULT', 'key_file')

    client = BattleshipClient(base_url=url, keyfile=key_file)
    client.create(name=name, ships=ships)

    if args.wait:
        client.wait_for_commit()