From 71466837dac557eea1fad9b4cddb6a428719cf50 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 16 Apr 2009 00:17:20 +0200 Subject: Use size instead of currentSize when comparing lv sizes parted and lvm have a different idea of the exact size of an LV, so when using currentSize to see if we need to resize, we will always create a ResizeAction, which will later on fail as "lvm lvresize" returns an error status if the requested resize is a nop. So use size instead, this is safe as we never change the size of existing lv's. This fixes a traceback with a lvmresize exception when trying to use an existing LV during install without changing its size. --- iw/lvm_dialog_gui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iw') diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py index 0089e96e3..ef52903c9 100644 --- a/iw/lvm_dialog_gui.py +++ b/iw/lvm_dialog_gui.py @@ -1057,7 +1057,7 @@ class VolumeGroupEditor: origlv = _lv break - if lv.resizable and lv.targetSize != origlv.currentSize: + if lv.resizable and lv.targetSize != origlv.size: actions.append(ActionResizeDevice(origlv, lv.targetSize)) if lv.format.exists: -- cgit