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@hvornum.se>2021-09-04 16:39:15 +0200
committerAnton Hvornum <anton@hvornum.se>2021-09-04 16:39:15 +0200
commit1814a19d6adb3e465df2a276cc87f85974f613c3 (patch)
treea5d30ce9da6184f6ff4fba85c93f28d9863eccbb /archinstall
parent81e52bc3fffa4bef38af0cd06888066425c4bdb5 (diff)
Fixed filtering if largest disk selection
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/disk.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index d4cabc67..4a5b2f4c 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -87,7 +87,7 @@ def select_largest_device(devices, gigabytes, filter_out=None):
if not len(copy_devices):
return None
- return max(copy_devices, key=(lambda device : abs(device.size - gigabytes)))
+ return max(copy_devices, key=(lambda device : device.size if device.size > gigabytes else 0))
def select_disk_larger_than_or_close_to(devices, gigabytes, filter_out=None):
if not filter_out: