def do(args):
    git_worktree = qisrc.parsers.get_git_worktree(args)
    group = args.group
    manifest = git_worktree.manifest
    if git_worktree.manifest.groups is None:
        groups = list()
    else:
        groups = copy.copy(git_worktree.manifest.groups)
    if group in groups:
        ui.error("Group", group, "already in use")
        sys.exit(1)
    else:
        groups.append(args.group)
    git_worktree.configure_manifest(manifest.url, groups=groups,
                                    branch=manifest.branch)
dataset/ETHPy150Open aldebaran/qibuild/python/qisrc/actions/add_group.py/do/original