When it is an implicit partition and hasn't been assigned a disk yet self.disk may be None, so skip checking the size against the disk when there isn't one.
Resolves: rhbz#1248973
From: "Brian C. Lane" bcl@redhat.com
When it is an implicit partition and hasn't been assigned a disk yet self.disk may be None, so skip checking the size against the disk when there isn't one.
Resolves: rhbz#1248973 --- blivet/devices/partition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blivet/devices/partition.py b/blivet/devices/partition.py index 18add66..a0fd54c 100644 --- a/blivet/devices/partition.py +++ b/blivet/devices/partition.py @@ -753,7 +753,7 @@ def _setSize(self, newsize):
# the rest is for changing the size of an allocated-but-not-existing # partition, which I'm not sure is advisable - if newsize > self.disk.size: + if self.disk and newsize > self.disk.size: raise ValueError("partition size would exceed disk size")
maxAvailableSize = Size(self.partedPartition.getMaxAvailableSize(unit="B"))
Added label: rhel7-branch.
Looks good to me.
Added label: ACK.
Closed.
pushed.
anaconda-patches@lists.fedorahosted.org