1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 14:27:00 +08:00

Fix: Update check fallback to classic git pull if git-over-cdn fails (#3164)

This commit is contained in:
LmeSzinc
2023-10-01 00:34:02 +08:00
parent ba3777ca4f
commit b91bf31bc3
2 changed files with 15 additions and 8 deletions

View File

@@ -70,12 +70,16 @@ class Updater(DeployConfig, GitManager, PipManager):
self.state = "checking"
if State.deploy_config.GitOverCdn:
if self.goc_client.is_uptodate():
status = self.goc_client.get_status()
if status == "uptodate":
logger.info(f"No update")
return False
else:
elif status == "behind":
logger.info(f"New update available")
return True
else:
# failed, should fallback to `git pull`
pass
source = "origin"
for _ in range(3):