[PATCH 2/2] Do not schedule resize actions for non-resizing requests (#1039491)

Vratislav Podzimek vpodzime at redhat.com
Wed Dec 11 11:09:23 UTC 2013


If user requests a partition to be shrinked, but then leaves the original size
as the target size, we should simply ignore such "shrink request".

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/ui/gui/spokes/lib/resize.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py b/pyanaconda/ui/gui/spokes/lib/resize.py
index ee5cdbe..f1a1bb2 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.py
+++ b/pyanaconda/ui/gui/spokes/lib/resize.py
@@ -387,7 +387,7 @@ class ResizeDialog(GUIObject):
 
         if obj.action == _(PRESERVE):
             return False
-        elif obj.action == _(SHRINK):
+        elif obj.action == _(SHRINK) and int(device.size) != int(obj.target):
             if device.resizable:
                 self.storage.resizeDevice(device, obj.target)
             else:
-- 
1.8.4.2



More information about the anaconda-patches mailing list