2 # Chris Lumens <clumens@redhat.com>
4 # Copyright 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.
16 from pykickstart
.constants
import *
17 from pykickstart
.errors
import *
18 from pykickstart
.options
import *
19 from pykickstart
.version
import *
21 from rhpl
.translate
import _
22 import rhpl
.translate
as translate
24 translate
.textdomain("pykickstart")
26 ### INHERIT FROM A PREVIOUS RELEASE
29 class F7Handler(FC6Handler
):
33 class Key(KickstartCommand
):
34 def __init__(self
, writePriority
=0, key
=""):
35 KickstartCommand
.__init
__(self
, writePriority
)
39 if self
.key
== KS_INSTKEY_SKIP
:
42 return "key %s" % self
.key
46 def parse(self
, args
):
48 raise KickstartValueError
, formatErrorMsg(self
.lineno
, msg
=_("Command %s only takes one argument") % "key")
50 if args
[0] == "--skip":
51 self
.key
= KS_INSTKEY_SKIP
59 FC6Handler
.__init
__(self
)
62 self
.unregisterCommand(self
.LangSupport
)
63 self
.unregisterCommand(self
.Mouse
)
64 self
.registerCommand(self
.Key(), ["key"])