mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-19 08:12:07 +08:00
Hotfix: fix update error alerts under some network conditions (#21059)
This reverts commit 3c9e46d8a2ec3f9c347b0f455f66179c8220c1e2.
This commit is contained in:
@@ -281,17 +281,12 @@ def check_git_fetch_result(fetch_txt):
|
||||
|
||||
def check_for_update() -> Tuple[bool, bool]:
|
||||
setup_git_options(OVERLAY_MERGED)
|
||||
fetch_output = None
|
||||
try:
|
||||
fetch_output = run(["git", "fetch", "--dry-run"], OVERLAY_MERGED, low_priority=True)
|
||||
return True, check_git_fetch_result(fetch_output)
|
||||
git_fetch_output = run(["git", "fetch", "--dry-run"], OVERLAY_MERGED, low_priority=True)
|
||||
return True, check_git_fetch_result(git_fetch_output)
|
||||
except subprocess.CalledProcessError:
|
||||
# check for internet
|
||||
if fetch_output is not None and fetch_output.startswith("fatal: unable to access") and \
|
||||
"Could not resolve host:" in str(fetch_output):
|
||||
return False, False
|
||||
return False, False
|
||||
|
||||
raise
|
||||
|
||||
def fetch_update(wait_helper: WaitTimeHelper) -> bool:
|
||||
cloudlog.info("attempting git fetch inside staging overlay")
|
||||
|
||||
Reference in New Issue
Block a user