From 22f049dcd5cc2d59d25a9530b07322b88036dd10 Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Tue, 27 Jan 2026 16:39:11 +0200 Subject: T7866: Fix not all CPUs have model name key Not all platrorms have the `Model` key in the output of the /proc/cpuinfo Use `unknown` if we cannot detect it --- src/op_mode/cpu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/op_mode/cpu.py b/src/op_mode/cpu.py index a8db16dfc..07cb90187 100755 --- a/src/op_mode/cpu.py +++ b/src/op_mode/cpu.py @@ -47,7 +47,7 @@ def _format_cpus(cpu_data): def _get_summary_data(): count = get_core_count() cpu_data = get_cpus() - models = [c['model name'] for c in cpu_data] + models = [c.get('model name', 'unknown') for c in cpu_data] env = {'count': count, "models": models} return env -- cgit v1.2.3