diff --git a/pulpcore/cli/core/generic.py b/pulpcore/cli/core/generic.py index 138d3c6ac..8b8179923 100644 --- a/pulpcore/cli/core/generic.py +++ b/pulpcore/cli/core/generic.py @@ -36,7 +36,7 @@ click.option( "--state", type=click.Choice( - ["waiting", "skipped", "running", "completed", "failed", "canceled"], + ["waiting", "skipped", "running", "completed", "failed", "canceled", "canceling"], case_sensitive=False, ), help=_("List only tasks in this state."), diff --git a/pulpcore/cli/core/task.py b/pulpcore/cli/core/task.py index 64c684957..cda3050ed 100644 --- a/pulpcore/cli/core/task.py +++ b/pulpcore/cli/core/task.py @@ -28,7 +28,7 @@ def task(ctx: click.Context, pulp_ctx: PulpContext) -> None: def show(pulp_ctx: PulpContext, task_ctx: PulpTaskContext, href: str, wait: bool) -> None: """Shows details of a task.""" entity = task_ctx.show(href) - if wait and entity["state"] in ["waiting", "running"]: + if wait and entity["state"] in ["waiting", "running", "canceling"]: click.echo(f"Waiting for task {href} to finish.", err=True) entity = pulp_ctx.wait_for_task(entity) pulp_ctx.output_result(entity)