Skip to content

Commit

Permalink
Merge pull request #148 from darlingtld/master
Browse files Browse the repository at this point in the history
Identical entity names will cause an infinite loop
  • Loading branch information
ashah-splunk authored Jan 19, 2022
2 parents ea1fb5b + 3dd5d75 commit a750f3b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion splunklib/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,10 @@ def __getitem__(self, key):
def _load_atom_entry(self, response):
elem = _load_atom(response, XNAME_ENTRY)
if isinstance(elem, list):
raise AmbiguousReferenceException("Fetch from server returned multiple entries for name %s." % self.name)
apps = [ele.entry.content.get('eai:appName') for ele in elem]

raise AmbiguousReferenceException(
"Fetch from server returned multiple entries for name '%s' in apps %s." % (elem[0].entry.title, apps))
else:
return elem.entry

Expand Down

0 comments on commit a750f3b

Please sign in to comment.