-
Notifications
You must be signed in to change notification settings - Fork 385
Closed
Description
SDK 1.3.1
client.py
when totalResults = 0, a empty array should be returned.. but
# Load an array of atom entries from the body of the given response
def _load_atom_entries(response):
r = _load_atom(response)
if 'feed' in r:
# Need this to handle a random case in the REST API
if r.feed.get('totalResults') == 0: <<-- it's actually a string "0" instead of number 0
return []
entries = r.feed.get('entry', None)
if entries is None: return None
return entries if isinstance(entries, list) else [entries]
# Unlike most other endpoints, the jobs endpoint does not return
# its state wrapped in another element, but at the top level.
# For example, in XML, it returns <entry>...</entry> instead of
# <feed><entry>...</entry></feed>.
else:
entries = r.get('entry', None)
if entries is None: return None
return entries if isinstance(entries, list) else [entries]Metadata
Metadata
Assignees
Labels
No labels