[blivet:rhel7] Use super to get much-needed MRO magic in constructor. (#1169229)

mulhern amulhern at redhat.com
Tue Dec 9 13:23:41 UTC 2014


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
-- 
1.9.3



More information about the anaconda-patches mailing list