summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2026-01-27 16:39:11 +0200
committerViacheslav Hletenko <v.gletenko@vyos.io>2026-01-27 16:39:11 +0200
commit22f049dcd5cc2d59d25a9530b07322b88036dd10 (patch)
treeb754afe0cb666e90a5c84c6693c98c5445de5967 /src
parent0a619674e6ce46add5d1573399179c0d8e29456c (diff)
downloadvyos-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-xsrc/op_mode/cpu.py2
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