From 2a49ee809f56d0463169b118ced85fa0f58fd4f0 Mon Sep 17 00:00:00 2001 From: "tompage1994@hotmail.co.uk" Date: Fri, 17 Dec 2021 15:21:25 +0000 Subject: [PATCH] diff plugin: Improve error message by outputting item --- plugins/lookup/controller_object_diff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/lookup/controller_object_diff.py b/plugins/lookup/controller_object_diff.py index 2896973fa..1833a89ed 100644 --- a/plugins/lookup/controller_object_diff.py +++ b/plugins/lookup/controller_object_diff.py @@ -103,12 +103,12 @@ def run(self, terms, variables=None, **kwargs): for item in compare_list: for key in keys_to_keep: if key not in item.keys(): - self.handle_error(msg="Key: '{0}' missing from item in compare_list".format(key)) + self.handle_error(msg="Key: '{0}' missing from item in compare_list item: {1}".format(key, item)) for item in api_list: for key in api_keys_to_keep: if key not in item.keys(): - self.handle_error(msg="Key: '{0}' missing from item in api_list. Does this object come from the api?".format(key)) + self.handle_error(msg="Key: '{0}' missing from item in api_list. Does this object come from the api? item: {1}".format(key, item)) # Reduce list to name and organization compare_list_reduced = [{key: item[key] for key in keys_to_keep} for item in compare_list]