fix: diagnose PCB startup before ICDB maintenance

This commit is contained in:
阿白叔 committed 2026-11-04 22:53:16 +08:00
1 parent 4ebe098ef0
commit beb2b06fdf
9 files changed
+338 -30

No files matched your search

+5 -7
View File
@@ -547,13 +547,11 @@ def run_verify(request, *, progress=None, flag_reader=None, process_runner=None,
return VerifyResult('BLOCKED', stderr='已有 CBB 校验任务运行,请等待结束。',
safe_to_continue=False)
if request.maintenance:
from .maintenance_entry import maintenance_needed, run_existing_address_maintenance
try:
needed = maintenance_needed(request)
except (ValueError, OSError) as error:
return VerifyResult('BLOCKED', stderr=str(error), safe_to_continue=False)
if needed:
return run_existing_address_maintenance(request, progress=progress, stop=stop)
from .maintenance_entry import run_diagnosed_maintenance
return run_diagnosed_maintenance(request, progress=progress, stop=stop,
diagnose=lambda probe: run_verify(probe, progress=progress, flag_reader=flag_reader,
process_runner=process_runner, port_check=port_check,
dialog_supervisor_factory=dialog_supervisor_factory, version_prompt=version_prompt, stop=stop))
from .library_lock import LibraryLock, LibraryBusy
if Path(request.lmc_file).is_file():
try: