From b0f552c332588da7e92a6bc104be01883de78fe9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 24 Feb 2023 20:34:46 +0530 Subject: [PATCH] Fix upload to github not aborting for uploads that fail with protocol errors rather than failure responses --- publish.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish.py b/publish.py index 47d12675b..f840f2682 100755 --- a/publish.py +++ b/publish.py @@ -305,7 +305,7 @@ class GitHub: # {{{ 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)