Let _api_request return batch responses from batch requests.

master
Ethan Dalool 2020-10-01 11:21:57 -07:00
parent 2ad6024ad8
commit 95de60fd86
1 changed files with 4 additions and 1 deletions

View File

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