Skip to content

Commit 27554e5

Browse files
author
Shakeel Mohamed
committed
Partial fix for github issue #119
Sometimes r.feed.get('totalResults') will return '0' instead of 0.
1 parent e771303 commit 27554e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

splunklib/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def _load_atom_entries(response):
201201
r = _load_atom(response)
202202
if 'feed' in r:
203203
# Need this to handle a random case in the REST API
204-
if r.feed.get('totalResults') == 0:
204+
if r.feed.get('totalResults') in [0, '0']:
205205
return []
206206
entries = r.feed.get('entry', None)
207207
if entries is None: return None

0 commit comments

Comments
 (0)