Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk
diff options
context:
space:
mode:
authorcodefiles <11915375+codefiles@users.noreply.github.com>2023-07-25 05:16:02 -0400
committerGitHub <noreply@github.com>2023-07-25 11:16:02 +0200
commitd76f4a029604dffe740ef1d44fa5f34ec0b23480 (patch)
tree266718e543e930f6d787dc55212b2971482815b4 /archinstall/lib/disk
parent69c37e7c79b8756e300438fd2d25f6d40db5e04b (diff)
Fix boot partition regression (#1942)
* Fix boot partition regression * Fix spelling
Diffstat (limited to 'archinstall/lib/disk')
-rw-r--r--archinstall/lib/disk/device_model.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py
index ad3426b6..b1d07d98 100644
--- a/archinstall/lib/disk/device_model.py
+++ b/archinstall/lib/disk/device_model.py
@@ -789,8 +789,8 @@ class DeviceModification:
"""
Similar to get_boot_partition() but excludes XBOOTLDR partitions from it's candidates.
"""
- fliltered = filter(lambda x: x.is_boot() and x.fs_type == FilesystemType.Fat32 and PartitionFlag.XBOOTLDR not in x.flags, self.partitions)
- return next(fliltered, None)
+ filtered = filter(lambda x: x.is_boot() and x.fs_type == FilesystemType.Fat32 and PartitionFlag.XBOOTLDR not in x.flags, self.partitions)
+ return next(filtered, None)
def get_boot_partition(self) -> Optional[PartitionModification]:
"""
@@ -798,11 +798,13 @@ class DeviceModification:
Only returns XBOOTLDR if separate EFI is detected using self.get_efi_partition()
"""
if efi_partition := self.get_efi_partition():
- fliltered = filter(lambda x: x.is_boot() and x != efi_partition and x.mountpoint, self.partitions)
+ filtered = filter(lambda x: x.is_boot() and x != efi_partition and x.mountpoint, self.partitions)
+ if boot_partition := next(filtered, None):
+ return boot_partition
+ return efi_partition
else:
- fliltered = filter(lambda x: x.is_boot() and x.mountpoint, self.partitions)
-
- return next(fliltered, None)
+ filtered = filter(lambda x: x.is_boot() and x.mountpoint, self.partitions)
+ return next(filtered, None)
def get_root_partition(self, relative_path: Optional[Path]) -> Optional[PartitionModification]:
filtered = filter(lambda x: x.is_root(relative_path), self.partitions)