initial request can also fail, retry
This commit is contained in:
parent
c045d32d2c
commit
823c017fa4
1 changed files with 11 additions and 2 deletions
|
@ -1118,8 +1118,17 @@ class API(ox.API):
|
|||
if resume:
|
||||
data = resume
|
||||
else:
|
||||
data = None
|
||||
while not data:
|
||||
try:
|
||||
data = self._json_request(url, data)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("\ninterrupted by user.")
|
||||
sys.exit(1)
|
||||
except:
|
||||
print("failed to start upload, will try again in 5 seconds\r", end='')
|
||||
sys.stdout.flush()
|
||||
time.sleep(5)
|
||||
print(filename)
|
||||
hide_cursor()
|
||||
|
||||
|
|
Loading…
Reference in a new issue