Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib')
-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: