Re: [PATCH] Fix syntax error in kickstart.py

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ack.

When committing on rhel6-branch, please make sure the Related bz reference
follows the format noted in docs/commit-log.txt.  It needs to be on its own
line and no space between rhbz and #

I know it seems unnecessarily restrictive, but the format is really to pass
the dist-cvs checkin hooks when building the pkg.

On Wed, 14 Apr 2010, Hans de Goede wrote:

Courtesy of pylint. The removeExistingFormat() function was using a
storage object, but did not get one passed in. This patch fixes this.

This patch is meant for master, f13 and rhel-6. Related: rhbz #576976
---
kickstart.py |   10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/kickstart.py b/kickstart.py
index 19c66c5..935d1a3 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -192,7 +192,7 @@ def deviceMatches(spec):

# Remove any existing formatting on a device, but do not remove the partition
# itself.  This sets up an existing device to be used in a --onpart option.
-def removeExistingFormat(device, devicetree):
+def removeExistingFormat(device, storage):
    deps = storage.deviceDeps(device)
    while deps:
        leaves = [d for d in deps if d.isleaf]
@@ -200,7 +200,7 @@ def removeExistingFormat(device, devicetree):
            storage.destroyDevice(leaf)
            deps.remove(leaf)

-    devicetree.registerAction(ActionDestroyFormat(device))
+    storage.devicetree.registerAction(ActionDestroyFormat(device))

###
### SUBCLASSES OF PYKICKSTART COMMAND HANDLERS
@@ -489,7 +489,7 @@ class LogVolData(commands.logvol.F12_LogVolData):
            if not device:
                raise KickstartValueError, formatErrorMsg(self.lineno, msg="Specified nonexistent LV %s in logvol command" % self.name)

-            removeExistingFormat(device, devicetree)
+            removeExistingFormat(device, storage)
            devicetree.registerAction(ActionCreateFormat(device, format))
        else:
            # If a previous device has claimed this mount point, delete the
@@ -759,7 +759,7 @@ class PartitionData(commands.partition.F12_PartData):
            if not device:
                raise KickstartValueError, formatErrorMsg(self.lineno, msg="Specified nonexistent partition %s in partition command" % self.onPart)

-            removeExistingFormat(device, devicetree)
+            removeExistingFormat(device, storage)
            devicetree.registerAction(ActionCreateFormat(device, kwargs["format"]))
        else:
            # If a previous device has claimed this mount point, delete the
@@ -901,7 +901,7 @@ class RaidData(commands.raid.F12_RaidData):
            if not device:
                raise KickstartValueError, formatErrorMsg(self.lineno, msg="Specifeid nonexistent RAID %s in raid command" % devicename)

-            removeExistingFormat(device, devicetree)
+            removeExistingFormat(device, storage)
            devicetree.registerAction(ActionCreateFormat(device, kwargs["format"]))
        else:
            # If a previous device has claimed this mount point, delete the


- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvGJBsACgkQ5hsjjIy1VkkgPACgndfPwWeu6mgV4CZBJrbbbK5E
ClMAn0pId7/n1MMv+aFtgiIZ0rrF5Fbi
=krWC
-----END PGP SIGNATURE-----

_______________________________________________
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