[f17 master] be more clear about kickstart keyboard errors (#789725)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Brian C. Lane" <bcl@xxxxxxxxxx>

When an invalid keyboard type is passed in a kickstart display an error
message that makes it clear that the value is incorrect.
---
 pyanaconda/kickstart.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 1d25142..eed6470 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -504,7 +504,11 @@ class IscsiName(commands.iscsiname.FC6_IscsiName):
 
 class Keyboard(commands.keyboard.FC3_Keyboard):
     def execute(self):
-        self.anaconda.keyboard.set(self.keyboard)
+        try:
+            self.anaconda.keyboard.set(self.keyboard)
+        except KeyError as e:
+            raise KickstartValueError, formatErrorMsg(self.lineno, msg="Invalid keyboard: %s" % (self.keyboard,))
+
         self.anaconda.keyboard.beenset = 1
         self.anaconda.dispatch.skip_steps("keyboard")
 
-- 
1.7.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux