index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds@gmail.com> | 2021-09-06 14:41:29 +0000 |
---|---|---|
committer | Anton Hvornum <anton.feeds@gmail.com> | 2021-09-06 14:41:29 +0000 |
commit | e10daf4c57b0aa6a8ce4677fc9375b6e8fbc84d0 (patch) | |
tree | 3ba3d199d010f8f87793b6bd37a459782ad318a7 | |
parent | 51565314b480e75f00354b73e2420d5cda883fa0 (diff) | |
parent | 4505c3a11ff8a6bda21fc0d86a621b0cb86ee498 (diff) |
-rw-r--r-- | archinstall/lib/hardware.py | 18 |
diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index 56444eeb..416045c4 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -111,23 +111,17 @@ def has_intel_graphics() -> bool: def cpu_vendor() -> Optional[str]: - cpu_info_raw = SysCommand("lscpu -J") - cpu_info = json.loads(b"".join(cpu_info_raw).decode('UTF-8'))['lscpu'] + for cpu in cpuinfo(): + return cpu.get("vendor_id") - for info in cpu_info: - if info.get('field', None) == "Vendor ID:": - return info.get('data', None) - return + return None def cpu_model() -> Optional[str]: - cpu_info_raw = SysCommand("lscpu -J") - cpu_info = json.loads(b"".join(cpu_info_raw).decode('UTF-8'))['lscpu'] + for cpu in cpuinfo(): + return cpu.get("model name") - for info in cpu_info: - if info.get('field', None) == "Model name:": - return info.get('data', None) - return + return None def sys_vendor() -> Optional[str]: |