Exemplo n.º 1
0
def remove_transplant(index):
    """Remove a transplant install by index."""
    try:
        index = int(index)
    except ValueError:
        click.echo(f"WARNING: index was not an integer (was {index})", err=True)
        sys.exit(1)

    try:
        transplant = htmap.transplants()[index]
    except IndexError:
        click.echo(f"ERROR: could not find a transplant install with index {index}", err=True)
        click.echo(f"Your transplant installs are:")
        click.echo(htmap.transplant_info())
        sys.exit(1)

    transplant.remove()
Exemplo n.º 2
0
def info():
    """Display information on available transplant installs."""
    click.echo(htmap.transplant_info())