From 03377bf973894e2959d937dfe90919ddce0868d6 Mon Sep 17 00:00:00 2001 From: Mathew McBride Date: Sun, 13 Nov 2022 07:09:20 +0000 Subject: T4956: fix 'show hardware cpu' issue on arm64 Traceback (most recent call last): File "/usr/libexec/vyos/op_mode/cpu.py", line 76, in res = vyos.opmode.run(sys.modules[__name__]) File "/usr/lib/python3/dist-packages/vyos/opmode.py", line 200, in run res = func(**args) File "/usr/libexec/vyos/op_mode/cpu.py", line 58, in show cpu_data = _get_raw_data() File "/usr/libexec/vyos/op_mode/cpu.py", line 40, in _get_raw_data return vyos.cpu.get_cpus() File "/usr/lib/python3/dist-packages/vyos/cpu.py", line 83, in get_cpus cpus_dict = _find_physical_cpus() File "/usr/lib/python3/dist-packages/vyos/cpu.py", line 76, in _find_physical_cpus phys_cpus[num] = cpu[num] NameError: name 'cpu' is not defined Co-authored By: MartB --- python/vyos/cpu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') diff --git a/python/vyos/cpu.py b/python/vyos/cpu.py index 488ae79fb..d2e5f6504 100644 --- a/python/vyos/cpu.py +++ b/python/vyos/cpu.py @@ -73,7 +73,7 @@ def _find_physical_cpus(): # On other architectures, e.g. on ARM, there's no such field. # We just assume they are different CPUs, # whether single core ones or cores of physical CPUs. - phys_cpus[num] = cpu[num] + phys_cpus[num] = cpus[num] return phys_cpus -- cgit v1.2.3