summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-03-09 16:31:44 -0500
committerDavid Lehman <dlehman@redhat.com>2009-03-09 20:13:56 -0500
commit299e8228d6b2ed9b3ee47e0ec28d98fae42c1aec (patch)
treeba9b55319572136e617095041fb01071e887a1be /storage
parent81e06ba2c61c9974167f1b394bf9c43904d0cfd1 (diff)
downloadanaconda-299e8228d6b2ed9b3ee47e0ec28d98fae42c1aec.tar.gz
anaconda-299e8228d6b2ed9b3ee47e0ec28d98fae42c1aec.tar.xz
anaconda-299e8228d6b2ed9b3ee47e0ec28d98fae42c1aec.zip
Only populate the device tree on demand.
We don't really want the tree populated when we instantiate it, so don't populate it until someone calls its populate method.
Diffstat (limited to 'storage')
-rw-r--r--storage/__init__.py2
-rw-r--r--storage/devicetree.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/storage/__init__.py b/storage/__init__.py
index 51a892d8b..4d8c13bcf 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -167,6 +167,7 @@ class Storage(object):
self.defaultFSType = get_default_filesystem_type()
self.defaultBootFSType = get_default_filesystem_type(boot=True)
+ # these will both be empty until our reset method gets called
self.devicetree = DeviceTree(intf=self.anaconda.intf,
ignored=self.ignoredDisks,
exclusive=self.exclusiveDisks,
@@ -216,6 +217,7 @@ class Storage(object):
zeroMbr=self.zeroMbr,
passphrase=self.encryptionPassphrase,
luksDict=self.__luksDevs)
+ self.devicetree.populate()
self.fsset = FSSet(self.devicetree)
w.pop()
diff --git a/storage/devicetree.py b/storage/devicetree.py
index 1692b0e83..7bd9ecc1d 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -170,8 +170,6 @@ class DeviceTree(object):
if luksDict and isinstance(luksDict, dict):
self.__luksDevs = luksDict
- self._populate()
-
def pruneActions(self):
""" Prune loops and redundant actions from the queue. """
# handle device destroy actions
@@ -1101,7 +1099,7 @@ class DeviceTree(object):
log.info("setup of %s failed: %s"
% (lv_device.name, e))
- def _populate(self):
+ def populate(self):
""" Locate all storage devices. """
# each iteration scans any devices that have appeared since the
# previous iteration