Rename command objects by inserting an underscore between the version part
[pykickstart.git] / pykickstart / commands / keyboard.py
blobf81ccbb36c2c389a87806503c084f999d0ed8097
2 # Chris Lumens <clumens@redhat.com>
4 # Copyright 2005, 2006, 2007 Red Hat, Inc.
6 # This software may be freely redistributed under the terms of the GNU
7 # general public license.
9 # You should have received a copy of the GNU General Public License
10 # along with this program; if not, write to the Free Software
11 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
13 from pykickstart.base import *
14 from pykickstart.errors import *
16 from rhpl.translate import _
17 import rhpl.translate as translate
19 translate.textdomain("pykickstart")
21 class FC3_Keyboard(KickstartCommand):
22 def __init__(self, writePriority=0, keyboard=""):
23 KickstartCommand.__init__(self, writePriority)
24 self.keyboard = keyboard
26 def __str__(self):
27 if self.keyboard != "":
28 return "# System keyboard\nkeyboard %s\n" % self.keyboard
29 else:
30 return ""
32 def parse(self, args):
33 if len(args) > 1:
34 raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s only takes one argument") % "keyboard")
36 self.keyboard = args[0]