[blivet:master 11/16] Change ActionCreateFormat constructor keyword argument to 'fmt'

mulhern amulhern at redhat.com
Thu May 1 13:08:48 UTC 2014


Change any calls appropriately.
---
 blivet/__init__.py     |  2 +-
 blivet/deviceaction.py | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/blivet/__init__.py b/blivet/__init__.py
index b5a7509..180ca36 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -850,7 +850,7 @@ class Blivet(object):
         # create a new disklabel on the disk
         newLabel = getFormat("disklabel", device=disk.path,
                              labelType=labelType)
-        create_action = ActionCreateFormat(disk, format=newLabel)
+        create_action = ActionCreateFormat(disk, fmt=newLabel)
         self.devicetree.registerAction(create_action)
 
     def removeEmptyExtendedPartitions(self):
diff --git a/blivet/deviceaction.py b/blivet/deviceaction.py
index 1129084..3fcf855 100644
--- a/blivet/deviceaction.py
+++ b/blivet/deviceaction.py
@@ -496,23 +496,23 @@ class ActionCreateFormat(DeviceAction):
     obj = ACTION_OBJECT_FORMAT
     typeDescStr = N_("create format")
 
-    def __init__(self, device, format=None):
+    def __init__(self, device, fmt=None):
         """
             :param device: the device on which the format will be created
             :type device: :class:`~.devices.StorageDevice`
-            :keyword format: the format to put on the device
-            :type format: :class:~.formats.DeviceFormat`
+            :keyword fmt: the format to put on the device
+            :type fmt: :class:~.formats.DeviceFormat`
 
             If no format is specified, it is assumed that the format is already
             associated with the device.
         """
         DeviceAction.__init__(self, device)
-        if format:
+        if fmt:
             self.origFormat = device.format
         else:
             self.origFormat = getFormat(None)
 
-        self._format = format or device.format
+        self._format = fmt or device.format
 
         if self._format.exists:
             raise ValueError("specified format already exists")
-- 
1.8.3.1



More information about the anaconda-patches mailing list