Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorRichard Neumann <mail@richard-neumann.de>2021-09-06 16:10:52 +0200
committerRichard Neumann <mail@richard-neumann.de>2021-09-06 16:12:16 +0200
commit086dcc3325706af63fb3827df14874839f4208a4 (patch)
tree5b4acfb04fa79aaf0b20a499b3e425eb8bc4e55b /archinstall/lib
parent81f3ccad40594fa9e8b4b71d4fae48fe459b6e59 (diff)
Refactor cpu_vendor() to use cpuinfo()
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/hardware.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py
index 56444eeb..d5bdc98f 100644
--- a/archinstall/lib/hardware.py
+++ b/archinstall/lib/hardware.py
@@ -111,13 +111,10 @@ 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]: