Fix upload to github not aborting for uploads that fail with protocol errors rather than failure responses

This commit is contained in:
Kovid Goyal 2023-02-24 20:34:46 +05:30
parent f7f4384876
commit b0f552c332
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -305,7 +305,7 @@ def make_request_with_retries(
self.error(failure_msg, 'with error:', e)
self.error(f'Retrying after {sleep_between_tries} seconds')
time.sleep(sleep_between_tries)
return None
raise SystemExit('All retries failed, giving up')
def patch(self, url: str, fail_msg: str, **data: str) -> None:
self.make_request_with_retries(url, data, method='PATCH', failure_msg=fail_msg)