diff --git a/subiquity/common/filesystem/gaps.py b/subiquity/common/filesystem/gaps.py index 1d93717b..d212ae65 100644 --- a/subiquity/common/filesystem/gaps.py +++ b/subiquity/common/filesystem/gaps.py @@ -173,8 +173,7 @@ def movable_trailing_partitions_and_gap_size(partition): part_idx = pgs.index(partition) trailing_partitions = [] in_extended = partition.flag == "logical" - for idx in range(part_idx + 1, len(pgs)): - pg = pgs[idx] + for pg in pgs[part_idx + 1:]: if isinstance(pg, Partition): if pg.preserve: break