@@ -789,20 +789,22 @@ def get_efi_partition(self) -> Optional[PartitionModification]:
789789 """
790790 Similar to get_boot_partition() but excludes XBOOTLDR partitions from it's candidates.
791791 """
792- fliltered = filter (lambda x : x .is_boot () and x .fs_type == FilesystemType .Fat32 and PartitionFlag .XBOOTLDR not in x .flags , self .partitions )
793- return next (fliltered , None )
792+ filtered = filter (lambda x : x .is_boot () and x .fs_type == FilesystemType .Fat32 and PartitionFlag .XBOOTLDR not in x .flags , self .partitions )
793+ return next (filtered , None )
794794
795795 def get_boot_partition (self ) -> Optional [PartitionModification ]:
796796 """
797797 Returns the first partition marked as XBOOTLDR (PARTTYPE id of bc13c2ff-...) or Boot and has a mountpoint.
798798 Only returns XBOOTLDR if separate EFI is detected using self.get_efi_partition()
799799 """
800800 if efi_partition := self .get_efi_partition ():
801- fliltered = filter (lambda x : x .is_boot () and x != efi_partition and x .mountpoint , self .partitions )
801+ filtered = filter (lambda x : x .is_boot () and x != efi_partition and x .mountpoint , self .partitions )
802+ if boot_partition := next (filtered , None ):
803+ return boot_partition
804+ return efi_partition
802805 else :
803- fliltered = filter (lambda x : x .is_boot () and x .mountpoint , self .partitions )
804-
805- return next (fliltered , None )
806+ filtered = filter (lambda x : x .is_boot () and x .mountpoint , self .partitions )
807+ return next (filtered , None )
806808
807809 def get_root_partition (self , relative_path : Optional [Path ]) -> Optional [PartitionModification ]:
808810 filtered = filter (lambda x : x .is_root (relative_path ), self .partitions )
0 commit comments