mirror of
https://github.com/aclist/dztui.git
synced 2026-08-27 02:07:18 +02:00
fix: handle remote repo timeout
This commit is contained in:
parent
a5140d7761
commit
2184622918
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user