diff options
author | Mike Fulbright <msf@redhat.com> | 2000-04-06 19:56:58 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2000-04-06 19:56:58 +0000 |
commit | 5b7db03a00ac67fa0f5170b68fface0d88568251 (patch) | |
tree | 2c5216ed72b1fdfd7f649dda43ad3c0242d8daec /textw | |
parent | 773f79ed5410e0e9aec76e4c508b0ddb015b0c0d (diff) | |
download | anaconda-5b7db03a00ac67fa0f5170b68fface0d88568251.tar.gz anaconda-5b7db03a00ac67fa0f5170b68fface0d88568251.tar.xz anaconda-5b7db03a00ac67fa0f5170b68fface0d88568251.zip |
Do not allow lilo boot labels with spaces in them
Diffstat (limited to 'textw')
-rw-r--r-- | textw/lilo.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/textw/lilo.py b/textw/lilo.py index 17a246142..f22531d7b 100644 --- a/textw/lilo.py +++ b/textw/lilo.py @@ -111,13 +111,14 @@ class LiloImagesWindow: subgrid.setField(bootLabel, 0, 1, anchorLeft = 1) subgrid.setField(newLabel, 1, 1, padding = (1, 0, 0, 0), anchorLeft = 1) - g = GridForm(screen, _("Edit Boot Label"), 1, 2) + g = GridForm(screen, _("Edit Boot Label Please"), 1, 2) g.add(subgrid, 0, 0, padding = (0, 0, 0, 1)) g.add(buttons, 0, 1, growx = 1) result = "" while (result != "ok" and result != "F12" and result != newLabel): result = g.run() + if (buttons.buttonPressed(result)): result = buttons.buttonPressed(result) @@ -126,6 +127,15 @@ class LiloImagesWindow: return itemLabel elif (result == "clear"): newLabel.set("") + elif (result == "ok" or result == "F12" or result == newLabel): + import regex + + if (regex.search (" ", newLabel.value()) != -1): + rc = ButtonChoiceWindow (screen, _("Invalid Boot Label"), + _("Boot labels cannot contain " + "space(s)."), + [ _("OK") ]) + result = "" screen.popWindow() |