Article View: linux.gentoo.dev
Article #230[gentoo-dev] [PATCH proj/dev2forge 2/2] codeberg: handle ConnectionError
From: Thomas Bracht Laumann Jespersen
Date: Sun, 29 Nov 2026 20:20
Date: Sun, 29 Nov 2026 20:20
29 lines
3034 bytes
3034 bytes
A Codeberg API request may fail with "Max retries exceeded" which
presents as a ConnectionError. We want to handle it the same as
HTTPError and RetryError.
Signed-off-by: Thomas Bracht Laumann Jespersen <laumann@gentoo.org>
---
codeberg/update-pr-submitter-db.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/codeberg/update-pr-submitter-db.py b/codeberg/update-pr-submitter-db.py
index 70a4eb3..d5b0351 100755
--- a/codeberg/update-pr-submitter-db.py
+++ b/codeberg/update-pr-submitter-db.py
@@ -107,7 +107,11 @@ def main(proxied_maints_json="proxied-maints.json", last_pr="proxied-maints-last
continue
maints[attributed_c["email"]] = attributed["login"]
last_pr_num = pr['number']
- except requests.exceptions.HTTPError, requests.exceptions.RetryError:
+ except (
+ requests.exceptions.HTTPError,
+ requests.exceptions.RetryError,
+ requests.exceptions.ConnectionError,
+ ):
import traceback
traceback.print_exc()
print('dumping found records')
--
2.56.1
Technical Details
Message-ID:
<O4Txo-eZ0S-25@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-lon.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodReferences:
<O4TnH-eYWU-1@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Thomas Bracht Laumann Jespersen <laumann@gentoo.org> Newsgroups: linux.gentoo.dev Subject: [gentoo-dev] [PATCH proj/dev2forge 2/2] codeberg: handle ConnectionError Date: Sun, 29 Nov 2026 21:20:02 +0100 Message-ID: <O4Txo-eZ0S-25@gated-at.bofh.it> References: <O4TnH-eYWU-1@gated-at.bofh.it> X-Original-To: gentoo-dev@lists.gentoo.org List-ID: Gentoo Linux mail <gentoo-dev.gentoo.org> Reply-To: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1177; i=laumann@gentoo.org; h=from:subject:message-id; bh=xrmdP4hSGxTQsSkqJUh2CiiIOLLSeNZ5HEWQmrlTQS4=; b=owGbwMvMwCWm/LstS/zLCmvG02pJDNk8bR4nr99+MXeu0nnd/Wb3Uj/Khfabvfi8VH5yW/LGb weOdzGwd3xkYRDjYpgppsiyesvKrovW4ieYDzLug5nDygQyRFqkgQEIWBj4chPzSo10jPRMtQ31 DIEMHaN4iJweg0ZmcXFpapFuWkGRQ15+SWJJZn5esV5+QWpeQXqBXlpmWklGRn5RcSrQCL281BJ HJycTR0sLRxdDYydDc2cLA2NnQwNDJ1cjYzcnCzMzR0NzNxNHC2MnBi5OAZhrsvQZ/he9kPjFIh V3V5nvda7lrYOf2VgUr6onLVrK38HryHLu3nqG/4GTwusmn1zRkelxgPvFl/b72emRe4+dmBH1v 1pl8aYdWjwA X-Developer-Key: i=laumann@gentoo.org; a=openpgp; fpr=94DC1AEB62B1E0B4FDC5DC3A85C9FB9C4405C282 Approved: robomod@news.nic.it Lines: 29 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: Thomas Bracht Laumann Jespersen <laumann@gentoo.org> X-Original-Date: Sun, 29 Nov 2026 21:08:32 +0100 X-Original-Message-ID: <20261129-record-last-pr-v1-2-653a93b26615@gentoo.org> X-Original-References: <20261129-record-last-pr-v1-0-653a93b26615@gentoo.org>