Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/hardware.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-04-02 11:32:52 +0200
committerAnton Hvornum <anton@hvornum.se>2021-04-02 11:32:52 +0200
commit3f0a53437414230f983cc2210998aa6c866a520d (patch)
treeef6270a97ca8d71ff404cc0d9db987100311ee96 /archinstall/lib/hardware.py
parent65ec50dae5beee594681a6d2057d380994188987 (diff)
parent0488c93a507fcb9e687b083ed8f11622d43ca9c2 (diff)
Merging master into feature branch.
Diffstat (limited to 'archinstall/lib/hardware.py')
-rw-r--r--archinstall/lib/hardware.py18
1 files changed, 5 insertions, 13 deletions
diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py
index 3586ad09..10f3970f 100644
--- a/archinstall/lib/hardware.py
+++ b/archinstall/lib/hardware.py
@@ -3,9 +3,7 @@ from .general import sys_command
from .networking import list_interfaces, enrichIfaceTypes
def hasWifi():
- if 'WIRELESS' in enrichIfaceTypes(list_interfaces().values()).values():
- return True
- return False
+ return 'WIRELESS' in enrichIfaceTypes(list_interfaces().values()).values()
def hasAMDCPU():
if subprocess.check_output("lscpu | grep AMD", shell=True).strip().decode():
@@ -24,18 +22,12 @@ def graphicsDevices():
return cards
def hasNvidiaGraphics():
- if [x for x in graphicsDevices() if 'nvidia' in x]:
- return True
- return False
+ return any('nvidia' in x for x in graphicsDevices())
def hasAmdGraphics():
- if [x for x in graphicsDevices() if 'amd' in x]:
- return True
- return False
+ return any('amd' in x for x in graphicsDevices())
def hasIntelGraphics():
- if [x for x in graphicsDevices() if 'intel' in x]:
- return True
- return False
+ return any('intel' in x for x in graphicsDevices())
-# TODO: Add more identifiers \ No newline at end of file
+# TODO: Add more identifiers