[master 4/5] Only return target size if it is set to something meaningful.
dwlehman
installerbot-noreply at redhat.com
Wed Jul 1 17:30:20 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 d90b3f5..62a8479 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/aade523ba8a7ed1af0da32d981a2211b866fb76f
More information about the anaconda-patches
mailing list