[blivet:all] Set _partedDevice attribute before calling device constructor (#1150147)
mulhern
amulhern at redhat.com
Fri Oct 17 21:47:01 UTC 2014
Related: fed#1150147
See previous commit: Set sysfsPath attribute for reason.
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/devices.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/blivet/devices.py b/blivet/devices.py
index 7ed131a..6c7d86a 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -568,9 +568,10 @@ class StorageDevice(Device):
self.exists = exists
self.uuid = uuid
- # Set sysfsPath before super call as MDRaidArrayDevice._addParent()
- # reads sysfsPath.
+ # Set these fields before super call as MDRaidArrayDevice._addParent()
+ # reads them, through calls to status() and partedDevice().
self.sysfsPath = sysfsPath
+ self._partedDevice = None
Device.__init__(self, name, parents=parents)
@@ -591,8 +592,6 @@ class StorageDevice(Device):
self.fstabComment = ""
self._targetSize = self._size
- self._partedDevice = None
-
self.deviceLinks = []
if self.exists and flags.testing and not self._size:
--
1.9.3
More information about the anaconda-patches
mailing list