Skip to content

Commit 76959b6

Browse files
committed
Use task result if available
1 parent 9297de6 commit 76959b6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added a preference to return the result of a task in case on is given over guessing what happened.

pulp-glue/pulp_glue/common/context.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,10 @@ def call(
469469
)
470470
if not non_blocking:
471471
result = self.wait_for_task(result)
472-
if isinstance(result, dict) and ["task_group"] == list(result.keys()):
472+
if self.has_plugin(PluginRequirement("core", specifier=">=3.86")):
473+
if result["result"] is not None:
474+
result = result["result"]
475+
elif isinstance(result, dict) and ["task_group"] == list(result.keys()):
473476
task_group_href = result["task_group"]
474477
result = self.api.call(
475478
"task_groups_read", parameters={"task_group_href": task_group_href}

0 commit comments

Comments
 (0)