Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-09-06 14:41:29 +0000
committerAnton Hvornum <anton.feeds@gmail.com>2021-09-06 14:41:29 +0000
commite10daf4c57b0aa6a8ce4677fc9375b6e8fbc84d0 (patch)
tree3ba3d199d010f8f87793b6bd37a459782ad318a7 /archinstall
parent51565314b480e75f00354b73e2420d5cda883fa0 (diff)
parent4505c3a11ff8a6bda21fc0d86a621b0cb86ee498 (diff)
Merged in master
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/hardware.py18
1 files changed, 6 insertions, 12 deletions
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]: