index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Richard Neumann <mail@richard-neumann.de> | 2021-10-21 22:54:00 +0200 |
---|---|---|
committer | Richard Neumann <mail@richard-neumann.de> | 2021-10-21 22:54:00 +0200 |
commit | 63c6f39f98efcaa644d2d64c2e9468cb240a32dd (patch) | |
tree | 4b15e56de6e2cfda7da6d5484c71b255901173d2 /archinstall | |
parent | 4f6cec5069023198b047cb61e3e65fb37a93d577 (diff) |
-rw-r--r-- | archinstall/lib/hardware.py | 9 |
diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index 4f8192e4..7172628b 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -1,4 +1,5 @@ import os +from functools import partial from pathlib import Path from typing import Iterator, Optional, Union @@ -95,11 +96,11 @@ def has_wifi() -> bool: return 'WIRELESS' in enrich_iface_types(list_interfaces().values()).values() -def has_amd_cpu() -> bool: - return any(cpu.get("vendor_id") == "AuthenticAMD" for cpu in cpuinfo()) +def has_cpu_vendor(vendor_id: str) -> bool: + return any(cpu.get("vendor_id") == vendor_id for cpu in cpuinfo()) -def has_intel_cpu() -> bool: - return any(cpu.get("vendor_id") == "GenuineIntel" for cpu in cpuinfo()) +has_amd_cpu = partial(has_cpu_vendor, "AuthenticAMD") +has_intel_cpu = partial(has_cpu_vendor, "GenuineIntel") def has_uefi() -> bool: return os.path.isdir('/sys/firmware/efi') |