From 218462291809f563eb4fa49498c60a9176e8ca25 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 29 Dec 2025 16:35:05 +0900 Subject: [PATCH] fix: handle remote repo timeout --- dzgui/init/update.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dzgui/init/update.py b/dzgui/init/update.py index 222374c..22fb189 100644 --- a/dzgui/init/update.py +++ b/dzgui/init/update.py @@ -13,10 +13,14 @@ from dzgui.init.prefix import is_prefix_writeable def get_latest_release() -> str | None: tag = None for url in [GITHUB_RELEASES, CODEBERG_RELEASES]: - res = requests.get(url, timeout=REQUEST_TIMEOUT) - if res.status_code == 200: - tag = res.json()["tag_name"] - break + try: + res = requests.get(url, timeout=REQUEST_TIMEOUT) + if res.status_code == 200: + tag = res.json()["tag_name"] + break + except Exception as e: + # TODO: log exception + continue return tag def allow_updates(allow: bool) -> bool: