summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-03-23 15:56:53 -0400
committerChris Lumens <clumens@redhat.com>2009-03-23 15:56:53 -0400
commit2e84e241d7bfea1ab22935256ca0e5a24ef7ebcb (patch)
treeb7d1ea31030df40b027e0d5c3893a02f6eb4ec44 /iw
parent407e5f91c28bea04d2a4aa70f6a15e63a4d7f094 (diff)
downloadanaconda-2e84e241d7bfea1ab22935256ca0e5a24ef7ebcb.tar.gz
anaconda-2e84e241d7bfea1ab22935256ca0e5a24ef7ebcb.tar.xz
anaconda-2e84e241d7bfea1ab22935256ca0e5a24ef7ebcb.zip
If the new size and old size are the same, treat as a no-op (#491496).
There's no sense raising a traceback if the user just chose the same size as the filesystem already is.
Diffstat (limited to 'iw')
-rw-r--r--iw/partition_dialog_gui.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py
index 45d940958..71c7333b3 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 \