mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 14:42:54 +01:00
feat: log timeout error when attempting update
This commit is contained in:
1 parent
5a76c37839
commit
b0565bc7f1
1 file changed
+3
-1
@@ -1,3 +1,4 @@
|
|||||||
|
import logging
|
||||||
import requests
|
import requests
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
@@ -9,6 +10,7 @@ from dzgui.const.constants import APP_NAME_LOWER, REQUEST_TIMEOUT
|
|||||||
from dzgui.const.endpoints import GITHUB_RELEASES, CODEBERG_RELEASES
|
from dzgui.const.endpoints import GITHUB_RELEASES, CODEBERG_RELEASES
|
||||||
from dzgui.init.prefix import is_prefix_writeable
|
from dzgui.init.prefix import is_prefix_writeable
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
def get_latest_release() -> str | None:
|
def get_latest_release() -> str | None:
|
||||||
tag = None
|
tag = None
|
||||||
@@ -19,7 +21,7 @@ def get_latest_release() -> str | None:
|
|||||||
tag = res.json()["tag_name"]
|
tag = res.json()["tag_name"]
|
||||||
break
|
break
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# TODO: log exception
|
logger.critical(e)
|
||||||
continue
|
continue
|
||||||
return tag
|
return tag
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user