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 *
15 from pykickstart
.options
import *
17 from rhpl
.translate
import _
18 import rhpl
.translate
as translate
20 translate
.textdomain("pykickstart")
22 class FC3_Upgrade(KickstartCommand
):
23 def __init__(self
, writePriority
=0, upgrade
=None):
24 KickstartCommand
.__init
__(self
, writePriority
)
25 self
.upgrade
= upgrade
28 if self
.upgrade
is None:
32 return "# Upgrade existing installation\nupgrade\n"
34 return "# Install OS instead of upgrade\ninstall\n"
36 def parse(self
, args
):
38 raise KickstartValueError
, formatErrorMsg(self
.lineno
, msg
=_("Kickstart command %s does not take any arguments") % "upgrade")
40 if self
.currentCmd
== "upgrade":