diff options
| author | Viacheslav <v.gletenko@vyos.io> | 2025-09-24 12:50:58 +0000 |
|---|---|---|
| committer | Viacheslav <v.gletenko@vyos.io> | 2025-09-24 12:50:58 +0000 |
| commit | aa654e6643c99e66a79f2eb39b5107765b07182f (patch) | |
| tree | d6c49777f2ad6c8202684c2cf972435b02e0e497 /src | |
| parent | d222f1accd6d6a5bda92dd570c2761ad5a343f45 (diff) | |
| download | vyos-1x-aa654e6643c99e66a79f2eb39b5107765b07182f.tar.gz vyos-1x-aa654e6643c99e66a79f2eb39b5107765b07182f.zip | |
T7861: System options CPU vendor_id bug for some platforms
Some platforms do not have `vendor_id` for the CPU information
This causes of `KeyError: 'vendor_id'` errors while commiting
system option kernel memory settings.
Fix this.
Diffstat (limited to 'src')
| -rwxr-xr-x | src/conf_mode/system_option.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/system_option.py b/src/conf_mode/system_option.py index 303557412..cb3d6ce9b 100755 --- a/src/conf_mode/system_option.py +++ b/src/conf_mode/system_option.py @@ -109,7 +109,8 @@ def verify(options): ) if 'kernel' in options: - cpu_vendor = get_cpus()[0]['vendor_id'] + _cpu_info = get_cpus()[0] + cpu_vendor = _cpu_info.get('vendor_id', 'unknown') if 'amd_pstate_driver' in options['kernel'] and cpu_vendor != 'AuthenticAMD': raise ConfigError( f'AMD pstate driver cannot be used with "{cpu_vendor}" CPU!' |
