[PATCH] It's --biospart, not --biosdisk (#620855).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 pykickstart/commands/driverdisk.py |   20 ++++++++++----------
 tests/commands/driverdisk.py       |   13 +++++++------
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/pykickstart/commands/driverdisk.py b/pykickstart/commands/driverdisk.py
index bf8dbd8..93d9d54 100644
--- a/pykickstart/commands/driverdisk.py
+++ b/pykickstart/commands/driverdisk.py
@@ -59,7 +59,7 @@ class FC4_DriverDiskData(FC3_DriverDiskData):
         FC3_DriverDiskData.__init__(self, *args, **kwargs)
         self.deleteRemovedAttrs()
 
-        self.biosdisk = kwargs.get("biosdisk", "")
+        self.biospart = kwargs.get("biospart", "")
 
     def _getArgsAsStr(self):
         retval = ""
@@ -71,8 +71,8 @@ class FC4_DriverDiskData(FC3_DriverDiskData):
                 retval += " --type=%s" % self.type
         elif self.source:
             retval += "--source=%s" % self.source
-        elif self.biosdisk:
-            retval += "--biosdisk=%s" % self.biosdisk
+        elif self.biospart:
+            retval += "--biospart=%s" % self.biospart
 
         return retval
 
@@ -136,7 +136,7 @@ class FC4_DriverDisk(FC3_DriverDisk):
 
     def _getParser(self):
         op = FC3_DriverDisk._getParser(self)
-        op.add_option("--biosdisk")
+        op.add_option("--biospart")
         return op
 
     def parse(self, args):
@@ -147,13 +147,13 @@ class FC4_DriverDisk(FC3_DriverDisk):
 
         if len(extra) == 1 and opts.source:
             raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one of --source and partition may be specified for driverdisk command."))
-        elif len(extra) == 1 and opts.biosdisk:
-            raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one of --biosdisk and partition may be specified for driverdisk command."))
-        elif opts.source and opts.biosdisk:
-            raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one of --biosdisk and --source may be specified for driverdisk command."))
+        elif len(extra) == 1 and opts.biospart:
+            raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one of --biospart and partition may be specified for driverdisk command."))
+        elif opts.source and opts.biospart:
+            raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one of --biospart and --source may be specified for driverdisk command."))
 
-        if not extra and not opts.source and not opts.biosdisk:
-            raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("One of --source, --biosdisk, or partition must be specified for driverdisk command."))
+        if not extra and not opts.source and not opts.biospart:
+            raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("One of --source, --biospart, or partition must be specified for driverdisk command."))
 
         ddd = self.handler.DriverDiskData()
         self._setToObj(self.op, opts, ddd)
diff --git a/tests/commands/driverdisk.py b/tests/commands/driverdisk.py
index 3817e72..91de2c1 100644
--- a/tests/commands/driverdisk.py
+++ b/tests/commands/driverdisk.py
@@ -43,14 +43,15 @@ class FC4_TestCase(FC3_TestCase):
         FC3_TestCase.runTest(self)
 
         # pass
-        self.assert_parse("driverdisk --biosdisk=0x82", "driverdisk --biosdisk=0x82\n")
+        self.assert_parse("driverdisk --biospart=0x82", "driverdisk --biospart=0x82\n")
+        self.assert_parse("driverdisk --biospart=0x80p1", "driverdisk --biospart=0x80p1\n")
 
         # fail - no arguments
-        self.assert_parse_error("driverdisk --biosdisk", KickstartParseError)
-        # fail - specifying both biosdisk and partition
-        self.assert_parse_error("driverdisk /dev/sdb2 --biosdisk=0x82", KickstartValueError)
-        # fail - specifying both biosdisk and source
-        self.assert_parse_error("driverdisk --source=http://10.0.0.1/disk.img --biosdisk=0x82", KickstartValueError)
+        self.assert_parse_error("driverdisk --biospart", KickstartParseError)
+        # fail - specifying both biospart and partition
+        self.assert_parse_error("driverdisk /dev/sdb2 --biospart=0x82", KickstartValueError)
+        # fail - specifying both biospart and source
+        self.assert_parse_error("driverdisk --source=http://10.0.0.1/disk.img --biospart=0x82", KickstartValueError)
 
 if __name__ == "__main__":
     unittest.main()
-- 
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux