summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMathew McBride <matt@traverse.com.au>2022-11-13 07:09:20 +0000
committerMartin Böh <martin@familie-boeh.de>2023-01-26 02:46:04 +0100
commit03377bf973894e2959d937dfe90919ddce0868d6 (patch)
tree8835ee29d0c851ecc0702d900fd9ba2a8d5cb037 /python
parent7634e16dcaaf4e08dec8bd9b92c6e731c32ef7cd (diff)
downloadvyos-1x-03377bf973894e2959d937dfe90919ddce0868d6.tar.gz
vyos-1x-03377bf973894e2959d937dfe90919ddce0868d6.zip
T4956: fix 'show hardware cpu' issue on arm64
Traceback (most recent call last): File "/usr/libexec/vyos/op_mode/cpu.py", line 76, in <module> 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 <contact@martb.dev>
Diffstat (limited to 'python')
-rw-r--r--python/vyos/cpu.py2
1 files changed, 1 insertions, 1 deletions
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