diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2026-01-27 16:39:11 +0200 |
|---|---|---|
| committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2026-01-27 16:39:11 +0200 |
| commit | 22f049dcd5cc2d59d25a9530b07322b88036dd10 (patch) | |
| tree | b754afe0cb666e90a5c84c6693c98c5445de5967 /src | |
| parent | 0a619674e6ce46add5d1573399179c0d8e29456c (diff) | |
| download | vyos-1x-22f049dcd5cc2d59d25a9530b07322b88036dd10.tar.gz vyos-1x-22f049dcd5cc2d59d25a9530b07322b88036dd10.zip | |
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
Diffstat (limited to 'src')
| -rwxr-xr-x | src/op_mode/cpu.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
