[PATCH 1/6] Set StorageDevice.exists before calling Device.__init__

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

 



Set self.exists in StorageDevice.__init__ before calling
Device.__init__, because some Device methods use .exists and they can be
called before StorageDevice.__init__ finishes.

This probably needs more rethinking, but it makes things better for now.
---
 storage/devices.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 3a00584..4137d4f 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -457,6 +457,7 @@ class StorageDevice(Device):
         if isinstance(parents, Device):
             parents = [parents]
 
+        self.exists = exists
         Device.__init__(self, device, parents=parents)
 
         self.uuid = None
@@ -465,7 +466,6 @@ class StorageDevice(Device):
         self.major = numeric_type(major)
         self.minor = numeric_type(minor)
         self.sysfsPath = sysfsPath
-        self.exists = exists
         self._serial = serial
         self._vendor = vendor
         self._model = model
-- 
1.6.5.2

_______________________________________________
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