diff options
author | Radek Vykydal <rvykydal@redhat.com> | 2009-04-28 12:51:37 +0200 |
---|---|---|
committer | Radek Vykydal <rvykydal@redhat.com> | 2009-04-30 12:24:29 +0200 |
commit | 4166a84be38fcfb1b9abe21a0c1fdecb657d78ab (patch) | |
tree | 2edeea862e733f086ebee374ccb2f2f5cee429c6 /iw | |
parent | 45495c9a890794f1b966fc5adbf8579b641b74cd (diff) | |
download | anaconda-4166a84be38fcfb1b9abe21a0c1fdecb657d78ab.tar.gz anaconda-4166a84be38fcfb1b9abe21a0c1fdecb657d78ab.tar.xz anaconda-4166a84be38fcfb1b9abe21a0c1fdecb657d78ab.zip |
Fix traceback in second editing of existing raid dev (#497234).
This only fixes the traceback, but not the deeper cause which
is that we are not editing original format request, but our last
request (edit), so e.g. in 2nd edit "Original filesystem type"
label and "Migrate" option are wrong (reflecting our last
request, not the original format). I added some more conditions
so that we do not display the info and do not offer migration
in such cases. Note that the checks also affect non-raid
existing partition editing in the same sense. The conditions
should be kept when the behavior is fixed.
Diffstat (limited to 'iw')
-rw-r--r-- | iw/partition_ui_helpers_gui.py | 4 | ||||
-rw-r--r-- | iw/raid_dialog_gui.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/iw/partition_ui_helpers_gui.py b/iw/partition_ui_helpers_gui.py index 1ff2d5f35..f73903ee2 100644 --- a/iw/partition_ui_helpers_gui.py +++ b/iw/partition_ui_helpers_gui.py @@ -337,7 +337,7 @@ def createPreExistFSOptionSection(origrequest, maintable, row, mountCombo, # this gets added to the table a bit later on lukscb = gtk.CheckButton(_("_Encrypt")) - if origfs.migratable: + if origfs.migratable and origfs.exists: migratecb = gtk.CheckButton(label=_("Mi_grate filesystem to:")) if formatcb is not None: migratecb.set_active(origfs.migrate and (not formatcb.get_active())) @@ -367,7 +367,7 @@ def createPreExistFSOptionSection(origrequest, maintable, row, mountCombo, (fstypeCombo, mountCombo, origfs, lukscb, migfstypeCombo, migratecb, FLAG_FORMAT)) - if origrequest.resizable: + if origrequest.resizable and origfs.exists: resizecb = gtk.CheckButton(label=_("_Resize")) resizecb.set_active(origfs.resizable and \ (origfs.currentSize != origfs.targetSize) and \ diff --git a/iw/raid_dialog_gui.py b/iw/raid_dialog_gui.py index 652a05001..49626c345 100644 --- a/iw/raid_dialog_gui.py +++ b/iw/raid_dialog_gui.py @@ -384,7 +384,7 @@ class RaidEditor: lbl.set_mnemonic_widget(self.fstypeCombo) maintable.attach(self.fstypeCombo, 1, 2, row, row + 1) row += 1 - else: + elif format.exists: maintable.attach(createAlignedLabel(_("Original File System Type:")), 0, 1, row, row + 1) if format.type: @@ -490,7 +490,7 @@ class RaidEditor: # format or not? self.formatButton = None self.fsoptionsDict = {} - if not format.exists: + if not format.exists and not origrequest.exists: self.formatButton = gtk.CheckButton(_("_Format partition?")) if not format.type: self.formatButton.set_active(1) |