Skip to content

Commit 3dd5d75

Browse files
author
Lingda Tang
committed
Identical entity names will cause an infinite loop "RuntimeError: maximum recursion depth exceeded". Give a clear message about which applications have this entity.
1 parent ceba6a0 commit 3dd5d75

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

splunklib/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,10 @@ def __getitem__(self, key):
933933
def _load_atom_entry(self, response):
934934
elem = _load_atom(response, XNAME_ENTRY)
935935
if isinstance(elem, list):
936-
raise AmbiguousReferenceException("Fetch from server returned multiple entries for name %s." % self.name)
936+
apps = [ele.entry.content.get('eai:appName') for ele in elem]
937+
938+
raise AmbiguousReferenceException(
939+
"Fetch from server returned multiple entries for name '%s' in apps %s." % (elem[0].entry.title, apps))
937940
else:
938941
return elem.entry
939942

0 commit comments

Comments
 (0)