Let _api_request return batch responses from batch requests.

This commit is contained in:
Ethan Dalool 2020-10-01 11:21:57 -07:00
parent 2ad6024ad8
commit 95de60fd86

View file

@ -72,7 +72,10 @@ class Mega:
if isinstance(json_resp, int):
# If this raises EAGAIN it'll be caught by tenacity retry.
raise errors.error_for_code(json_resp)
return json_resp[0]
if len(json_resp) == 1:
return json_resp[0]
else:
return json_resp
def _api_account_version_and_salt(self, email):
"""