Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Server Development (http://www.linux-archive.org/ubuntu-server-development/)
-   -   be more clear about kickstart keyboard errors (#789725) (http://www.linux-archive.org/ubuntu-server-development/664404-more-clear-about-kickstart-keyboard-errors-789725-a.html)

"Brian C. Lane" 05-08-2012 05:17 PM

be more clear about kickstart keyboard errors (#789725)
 
From: "Brian C. Lane" <bcl@redhat.com>

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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 12:39 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.