diff options
-rw-r--r-- | autopart.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/autopart.py b/autopart.py index c7c0a1048..f426a93f8 100644 --- a/autopart.py +++ b/autopart.py @@ -154,10 +154,12 @@ def fitConstrained(diskset, requests, primOnly=0, newParts = None): if disk.type.check_feature(parted.DISK_TYPE_EXTENDED) and disk.extended_partition: - if (disk.extended_part.geom.start < startSec) and (disk.extended_part.geom.end > endSec): + if (disk.extended_partition.geom.start < startSec) and (disk.extended_partition.geom.end > endSec): partType = parted.PARTITION_LOGICAL if request.primary: # they've required a primary and we can't do it return PARTITION_FAIL + else: + partType = parted.PARTITION_PRIMARY else: # XXX need a better way to do primary vs logical stuff ret = bestPartType(disk, request) |