[anaconda:master 2/4] Change uses of 'format' keyword param to 'fmt' keyword param

mulhern amulhern at redhat.com
Thu May 1 13:11:27 UTC 2014


Signed-off-by: mulhern <amulhern at redhat.com>
---
 pyanaconda/kickstart.py | 48 ++++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 0881c5d..c1f016a 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -865,7 +865,7 @@ class LogVolData(commands.logvol.F20_LogVolData):
             else:
                 maxsize = None
 
-            request = storage.newLV(format=fmt,
+            request = storage.newLV(fmt=fmt,
                                     name=self.name,
                                     parents=parents,
                                     size=size,
@@ -892,7 +892,7 @@ class LogVolData(commands.logvol.F20_LogVolData):
                                           escrow_cert=cert,
                                           add_backup_passphrase=self.backuppassphrase)
                 luksdev = LUKSDevice("luks%d" % storage.nextID,
-                                     format=luksformat,
+                                     fmt=luksformat,
                                      parents=device)
             else:
                 luksformat = request.format
@@ -901,7 +901,7 @@ class LogVolData(commands.logvol.F20_LogVolData):
                                            escrow_cert=cert,
                                            add_backup_passphrase=self.backuppassphrase)
                 luksdev = LUKSDevice("luks%d" % storage.nextID,
-                                     format=luksformat,
+                                     fmt=luksformat,
                                      parents=request)
             storage.createDevice(luksdev)
 
@@ -1067,13 +1067,13 @@ class PartitionData(commands.partition.F18_PartData):
             return
 
         # Now get a format to hold a lot of these extra values.
-        kwargs["format"] = getFormat(ty,
-                                     mountpoint=self.mountpoint,
-                                     label=self.label,
-                                     fsprofile=self.fsprofile,
-                                     mountopts=self.fsopts,
-                                     size=size)
-        if not kwargs["format"].type:
+        kwargs["fmt"] = getFormat(ty,
+           mountpoint=self.mountpoint,
+           label=self.label,
+           fsprofile=self.fsprofile,
+           mountopts=self.fsopts,
+           size=size)
+        if not kwargs["fmt"].type:
             raise KickstartValueError(formatErrorMsg(self.lineno, msg="The \"%s\" filesystem type is not supported." % ty))
 
         # If we were given a specific disk to create the partition on, verify
@@ -1134,7 +1134,7 @@ class PartitionData(commands.partition.F18_PartData):
                     raise KickstartValueError(formatErrorMsg(self.lineno,
                             msg="Invalid target size (%d) for device %s" % (self.size, device.name)))
 
-            devicetree.registerAction(ActionCreateFormat(device, kwargs["format"]))
+            devicetree.registerAction(ActionCreateFormat(device, kwargs["fmt"]))
             if ty == "swap":
                 storage.addFstabSwap(device)
         # tmpfs mounts are not disks and don't occupy a disk partition,
@@ -1163,13 +1163,13 @@ class PartitionData(commands.partition.F18_PartData):
 
             cert = getEscrowCertificate(storage.escrowCertificates, self.escrowcert)
             if self.onPart:
-                luksformat = kwargs["format"]
+                luksformat = kwargs["fmt"]
                 device.format = getFormat("luks", passphrase=self.passphrase, device=device.path,
                                           cipher=self.cipher,
                                           escrow_cert=cert,
                                           add_backup_passphrase=self.backuppassphrase)
                 luksdev = LUKSDevice("luks%d" % storage.nextID,
-                                     format=luksformat,
+                                     fmt=luksformat,
                                      parents=device)
             else:
                 luksformat = request.format
@@ -1178,7 +1178,7 @@ class PartitionData(commands.partition.F18_PartData):
                                            escrow_cert=cert,
                                            add_backup_passphrase=self.backuppassphrase)
                 luksdev = LUKSDevice("luks%d" % storage.nextID,
-                                     format=luksformat,
+                                     fmt=luksformat,
                                      parents=request)
             storage.createDevice(luksdev)
 
@@ -1271,12 +1271,12 @@ class RaidData(commands.raid.F18_RaidData):
             raidmems.append(dev)
 
         # Now get a format to hold a lot of these extra values.
-        kwargs["format"] = getFormat(ty,
-                                     label=self.label,
-                                     fsprofile=self.fsprofile,
-                                     mountpoint=self.mountpoint,
-                                     mountopts=self.fsopts)
-        if not kwargs["format"].type:
+        kwargs["fmt"] = getFormat(ty,
+           label=self.label,
+           fsprofile=self.fsprofile,
+           mountpoint=self.mountpoint,
+           mountopts=self.fsopts)
+        if not kwargs["fmt"].type:
             raise KickstartValueError(formatErrorMsg(self.lineno, msg="The \"%s\" filesystem type is not supported." % ty))
 
         kwargs["name"] = devicename
@@ -1295,7 +1295,7 @@ class RaidData(commands.raid.F18_RaidData):
                 raise KickstartValueError(formatErrorMsg(self.lineno, msg="Specifeid nonexistent RAID %s in raid command" % devicename))
 
             removeExistingFormat(device, storage)
-            devicetree.registerAction(ActionCreateFormat(device, kwargs["format"]))
+            devicetree.registerAction(ActionCreateFormat(device, kwargs["fmt"]))
         else:
             if devicename and devicename in (a.name for a in storage.mdarrays):
                 raise KickstartValueError(formatErrorMsg(self.lineno, msg="The Software RAID array name \"%s\" is already in use." % devicename))
@@ -1322,13 +1322,13 @@ class RaidData(commands.raid.F18_RaidData):
 
             cert = getEscrowCertificate(storage.escrowCertificates, self.escrowcert)
             if self.preexist:
-                luksformat = kwargs["format"]
+                luksformat = kwargs["fmt"]
                 device.format = getFormat("luks", passphrase=self.passphrase, device=device.path,
                                           cipher=self.cipher,
                                           escrow_cert=cert,
                                           add_backup_passphrase=self.backuppassphrase)
                 luksdev = LUKSDevice("luks%d" % storage.nextID,
-                                     format=luksformat,
+                                     fmt=luksformat,
                                      parents=device)
             else:
                 luksformat = request.format
@@ -1337,7 +1337,7 @@ class RaidData(commands.raid.F18_RaidData):
                                            escrow_cert=cert,
                                            add_backup_passphrase=self.backuppassphrase)
                 luksdev = LUKSDevice("luks%d" % storage.nextID,
-                                     format=luksformat,
+                                     fmt=luksformat,
                                      parents=request)
             storage.createDevice(luksdev)
 
-- 
1.8.3.1



More information about the anaconda-patches mailing list