Rename command objects by inserting an underscore between the version part
[pykickstart.git] / pykickstart / commands / mediacheck.py
blob895fb04b4411d890ad62c084e26d7d8ac17fcc62
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.
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 FC4_MediaCheck(KickstartCommand):
23 def __init__(self, writePriority=0, mediacheck=False):
24 KickstartCommand.__init__(self, writePriority)
25 self.mediacheck = mediacheck
27 def __str__(self):
28 if self.mediacheck:
29 return "mediacheck\n"
30 else:
31 return ""
33 def parse(self, args):
34 if len(args) > 0:
35 raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s does not take any arguments") % "mediacheck")
37 self.mediacheck = True