[blivet:rhel7] Use super to get much-needed MRO magic in constructor. (#1169229)
Vratislav Podzimek
vpodzime at redhat.com
Tue Dec 9 14:09:19 UTC 2014
On Tue, 2014-12-09 at 08:23 -0500, mulhern wrote:
> From: David Lehman <dlehman at redhat.com>
>
> Resolves: rhbz#1169229
>
> super does some magic along the lines of running superclass constructors
> breadth-first, which is necessary for container devices that inherit first
> from a non-container class.
>
> (cherry picked from commit 2a41c32e0a7d82db993e776966268f4ab4af408a)
> ---
> blivet/devices.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/blivet/devices.py b/blivet/devices.py
> index 0f5488e..5a00aca 100644
> --- a/blivet/devices.py
> +++ b/blivet/devices.py
> @@ -2139,7 +2139,7 @@ class DMDevice(StorageDevice):
> map name in many cases. The uuid, however, is a persistent UUID
> stored in device metadata on disk.
> """
> - StorageDevice.__init__(self, name, fmt=fmt, size=size,
> + super(DMDevice, self).__init__(name, fmt=fmt, size=size,
> exists=exists, uuid=uuid,
> parents=parents, sysfsPath=sysfsPath)
> self.target = target
ACK.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list