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 09:01:07 +0000
committerGitHub <noreply@github.com>2021-04-02 09:01:07 +0000
commit0488c93a507fcb9e687b083ed8f11622d43ca9c2 (patch)
tree542df9eddbc56591e3fd95df2531d4f1f7cc5f17 /archinstall/lib/hardware.py
parent5f9966b5c1c4ead5cb98b96ab2591b5b1d108260 (diff)
parentc0cfa7ae929a55cf2ea4458f758e9196242a3cc9 (diff)
Merge pull request #134 from conqp/master
General code cleanup
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 93eb560f..5828fd09 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 hasUEFI():
return os.path.isdir('/sys/firmware/efi')
@@ -19,18 +17,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