From 8a11a72e0c9318f20c17742be942142fc27b6a2c Mon Sep 17 00:00:00 2001 From: Alexandre Garnier Date: Wed, 29 Apr 2020 22:17:03 +0200 Subject: [PATCH] Fix issue ansible/ansible#59059 (#15) When no sorting was selected, `result` was a `odict_items` which is not subscriptable, so the slicing was failing. --- plugins/callback/profile_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/callback/profile_tasks.py b/plugins/callback/profile_tasks.py index 9e25aaf..9433b96 100644 --- a/plugins/callback/profile_tasks.py +++ b/plugins/callback/profile_tasks.py @@ -172,7 +172,7 @@ class CallbackModule(CallbackBase): timestamp(self) self.current = None - results = self.stats.items() + results = list(self.stats.items()) # Sort the tasks by the specified sort if self.sort_order is not None: