Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Sep 17, 2024
1 parent cf95bad commit 32e95d9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pioreactor/cli/pios.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def _thread_function(unit: str) -> bool:
_thread_function(unit)

@pios.command("rm", short_help="rm a file across the cluster")
@click.argument("filepath", type=click.Path(exists=True, resolve_path=True))
@click.argument("filepath", type=click.Path(resolve_path=True))
@which_units
@confirmation
def rm(
Expand Down Expand Up @@ -328,7 +328,7 @@ def _thread_function(unit: str) -> tuple[bool, dict]:

for result, api_result in results:
click.secho(
f'{api_result.get("unit")}: {api_result.get("result_url_path")}',
api_result,
fg="green" if result else "red",
)

Expand Down Expand Up @@ -366,7 +366,7 @@ def install_plugin(plugin: str, source: str | None, units: tuple[str, ...], y: b
commands["options"] = {"source": source}

def _thread_function(unit: str) -> tuple[bool, dict]:
print(f"Installing {plugin} on {unit}")
click.echo(f"Installing {plugin} on {unit}")
try:
r = post_into(
resolve_to_address(unit), "/unit_api/plugins/install", json=commands, timeout=60
Expand All @@ -382,7 +382,7 @@ def _thread_function(unit: str) -> tuple[bool, dict]:

for result, api_result in results:
click.secho(
f'{api_result.get("unit")}: {api_result.get("result_url_path")}',
api_result,
fg="green" if result else "red",
)

Expand All @@ -409,7 +409,7 @@ def uninstall_plugin(plugin: str, units: tuple[str, ...], y: bool) -> None:
raise click.Abort()

def _thread_function(unit: str) -> tuple[bool, dict]:
print(f"Uninstalling {plugin} on {unit}")
click.echo(f"Uninstalling {plugin} on {unit}")
try:
r = post_into(
resolve_to_address(unit), "/unit_api/plugins/uninstall", json=commands, timeout=60
Expand All @@ -426,7 +426,7 @@ def _thread_function(unit: str) -> tuple[bool, dict]:

for result, api_result in results:
click.secho(
f'{api_result.get("unit")}: {api_result.get("result_url_path")}',
api_result,
fg="green" if result else "red",
)

Expand Down

0 comments on commit 32e95d9

Please sign in to comment.