From 2c517addc5de57d239efb644b0af9d4e14893f30 Mon Sep 17 00:00:00 2001 From: Mario Lavoie Date: Wed, 28 Jan 2026 02:27:45 +0000 Subject: [PATCH] Fix KeyError: use .get() for all optional result fields --- src/cad_documenter/cli_project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cad_documenter/cli_project.py b/src/cad_documenter/cli_project.py index e8b4bdb..f4dc984 100644 --- a/src/cad_documenter/cli_project.py +++ b/src/cad_documenter/cli_project.py @@ -147,7 +147,7 @@ def process(project_path: Path, process_all: bool, export_only: bool): for name in results['updated_components']: console.print(f" [yellow]~[/yellow] {name}") - if results['errors']: + if results.get('errors'): console.print("\n[bold red]Errors:[/bold red]") for err in results['errors']: console.print(f" [red]X[/red] {err['video']}: {err['error']}")