Skip to content

Commit

Permalink
TXXXX: fix 'show hardware cpu' issue on arm64
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mcbridematt committed Nov 13, 2022
1 parent 1e1e1f1 commit b54463e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/vyos/cpu.py
Expand Up @@ -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

Expand Down

0 comments on commit b54463e

Please sign in to comment.