Commit 5d47ad16 authored by richardARPANET's avatar richardARPANET


parent 7bc9caba
......@@ -34,9 +34,7 @@ memory = Memory(location, verbose=0)
def _log_request_failed(*args, **kwargs):
'Request failed, sleeping then retrying... %s %s', args, kwargs
)'Request failed, sleeping then retrying... %s %s')
def write_operation(method):
......@@ -191,6 +189,11 @@ class Mega:
json_resp = json.loads(req.text)
if isinstance(json_resp, int):
if json_resp == -3:
action = data[0]['a']
except KeyError:
action = 'unknown''Request failed for action: %s', action)
raise RuntimeError('Request failed, retrying')
raise RequestError(json_resp)
return json_resp[0]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment