[PATCH] If the new size and old size are the same, treat as a no-op (#491496).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There's no sense raising a traceback if the user just chose the same size
as the filesystem already is.
---
 iw/partition_dialog_gui.py |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py
index 45d9409..71c7333 100644
--- a/iw/partition_dialog_gui.py
+++ b/iw/partition_dialog_gui.py
@@ -238,9 +238,13 @@ class PartitionEditor:
                 if self.fsoptionsDict.has_key("resizecb") and \
                    self.fsoptionsDict["resizecb"].get_active():
                     size = self.fsoptionsDict["resizesb"].get_value_as_int()
-                    actions.append(ActionResizeDevice(request, size))
-                    if request.format.type:
-                        actions.append(ActionResizeFormat(request, size))
+
+                    try:
+                        actions.append(ActionResizeDevice(request, size))
+                        if request.format.type:
+                            actions.append(ActionResizeFormat(request, size))
+                    except ValueError:
+                        pass
 
                 if request.format.exists and \
                    getattr(request, "mountpoint", None) and \
-- 
1.6.1.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux