[master 5/5] Only return target size if it is set to something meaningful.
dwlehman
installerbot-noreply at redhat.com
Wed Jul 8 21:13:19 UTC 2015
From: David Lehman <dlehman at redhat.com>
This allows setting targetSize to zero to cancel a resize, which
is nicer than having to set it to the current size.
---
blivet/devices/storage.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blivet/devices/storage.py b/blivet/devices/storage.py
index a095f6f..69d5274 100644
--- a/blivet/devices/storage.py
+++ b/blivet/devices/storage.py
@@ -538,7 +538,7 @@ def addHook(self, new=True):
def _getSize(self):
""" Get the device's size, accounting for pending changes. """
size = self._size
- if self.exists and self.resizable:
+ if self.exists and self.resizable and self.targetSize != Size(0):
size = self.targetSize
return size
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/9f925f724970ef2418af9799cb46d3dab42202d8
More information about the anaconda-patches
mailing list