summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-06-11 16:59:15 +0000
committerJeremy Katz <katzj@redhat.com>2002-06-11 16:59:15 +0000
commitabcf2177344e1e22db11f8368ab89a9b4adf6eec (patch)
tree239df0aeb328de5d6096677f8ad2cf8c416ba927
parent73a495cdb7ff93d5675efb4972e23c28a1424067 (diff)
downloadanaconda-abcf2177344e1e22db11f8368ab89a9b4adf6eec.tar.gz
anaconda-abcf2177344e1e22db11f8368ab89a9b4adf6eec.tar.xz
anaconda-abcf2177344e1e22db11f8368ab89a9b4adf6eec.zip
if we edit the device, we don't want to end up with None as the label (#66371)
-rw-r--r--iw/bootloader_gui.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/iw/bootloader_gui.py b/iw/bootloader_gui.py
index 33dc6876f..34613d7fa 100644
--- a/iw/bootloader_gui.py
+++ b/iw/bootloader_gui.py
@@ -452,16 +452,23 @@ class AdvancedBootloaderWindow (InstallWindow):
type="warning")
continue
+ # if we're editing a previous, get what the old info was for
+ # labels. otherwise, make it something safe for grub and the
+ # device name for lilo for lack of any better ideas
+ if oldDevice:
+ (oldshort, oldlong, oldisroot) = self.imagelist[oldDevice]
+ else:
+ (oldshort, oldlong, oldisroot) = (dev, label, None)
+
# if we're editing and the device has changed, delete the old
if oldDevice and dev != oldDevice:
del self.imagelist[oldDevice]
-
# go ahead and add it
if self.bl.useGrub():
- self.imagelist[dev] = (None, label, isRoot)
+ self.imagelist[dev] = (oldshort, label, isRoot)
else:
- self.imagelist[dev] = (label, None, isRoot)
+ self.imagelist[dev] = (label, oldlong, isRoot)
if default.get_active():
self.defaultDev = dev