[rhel7-branch 1/1] Partition requests may not have partedPartition (#1248973)

bcl installerbot-noreply at redhat.com
Mon Aug 10 19:00:05 UTC 2015


From: "Brian C. Lane" <bcl at redhat.com>

Check for it and return, assuming the new size will be assigned to a
disk with enough space.

Resolves: rhbz#1248973
---
 blivet/devices/partition.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/blivet/devices/partition.py b/blivet/devices/partition.py
index a0fd54c..046b380 100644
--- a/blivet/devices/partition.py
+++ b/blivet/devices/partition.py
@@ -756,6 +756,10 @@ def _setSize(self, newsize):
         if self.disk and newsize > self.disk.size:
             raise ValueError("partition size would exceed disk size")
 
+        if not self.partedPartition:
+            log.warn("No partedPartition, not adjusting geometry")
+            return
+
         maxAvailableSize = Size(self.partedPartition.getMaxAvailableSize(unit="B"))
 
         if newsize > maxAvailableSize:


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/35efaaa6c82a842bc1e2e1d1c71bc79d7614462f


More information about the anaconda-patches mailing list