index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-09-06 16:29:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-06 16:29:14 +0200 |
commit | 4505c3a11ff8a6bda21fc0d86a621b0cb86ee498 (patch) | |
tree | 78798ec0a6832b369fcb2181c1ad6d39512a16dc /archinstall | |
parent | 81f3ccad40594fa9e8b4b71d4fae48fe459b6e59 (diff) | |
parent | 8841e209ee7d0cadb7b7c68e5001b4c006d3714b (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]: |