Fix address of checking the Dashboard upload status
No-Presubmit: True Bug: webrtc:12162 Change-Id: I11d46550f5f1beb412b5c8911d6864ab8eaac114 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/194001 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Andrey Logvin <landrey@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32634}
This commit is contained in:
committed by
Commit Bot
parent
942bf345ed
commit
9e302eaaca
@ -93,15 +93,16 @@ def _WaitForUploadConfirmation(url, oauth_token, upload_token, wait_timeout,
|
||||
time.sleep((next_poll_time - current_time).total_seconds())
|
||||
next_poll_time = datetime.datetime.now() + wait_polling_period
|
||||
|
||||
response, content = http.request(url + '/uploads' + upload_token,
|
||||
response, content = http.request(url + '/uploads/' + upload_token,
|
||||
method='GET', headers=headers)
|
||||
|
||||
print 'Upload state polled. Response: %r.' % content
|
||||
|
||||
if response.status != 200:
|
||||
break
|
||||
|
||||
resp_json = json.loads(content)
|
||||
if (response.status != 200 or
|
||||
resp_json['state'] == 'COMPLETED' or
|
||||
resp_json['state'] == 'FAILED'):
|
||||
if resp_json['state'] == 'COMPLETED' or resp_json['state'] == 'FAILED':
|
||||
break
|
||||
|
||||
return response, resp_json
|
||||
|
||||
Reference in New Issue
Block a user