Skip to content

Commit

Permalink
diff plugin: Improve error message by outputting item
Browse files Browse the repository at this point in the history
  • Loading branch information
Tompage1994 committed Dec 17, 2021
1 parent 080ec6d commit 2a49ee8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/lookup/controller_object_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 2a49ee8

Please sign in to comment.