diff options
author | David Lehman <dlehman@redhat.com> | 2010-01-12 13:30:04 -0600 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2010-01-13 11:02:53 -0600 |
commit | c70a8b5fc07d583197d35bc3cd5c16110f806ecf (patch) | |
tree | 77319569afe9c08489829374213dfb6b3ce45db6 /storage | |
parent | 22521ff8c31251e7750ee206c55a840e3e320da0 (diff) | |
download | anaconda-c70a8b5fc07d583197d35bc3cd5c16110f806ecf.tar.gz anaconda-c70a8b5fc07d583197d35bc3cd5c16110f806ecf.tar.xz anaconda-c70a8b5fc07d583197d35bc3cd5c16110f806ecf.zip |
Make partitioned attr depend on whether the device is partitionable.
This way lvm lvs containing a disklabel will not be treated like disks.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/__init__.py | 3 | ||||
-rw-r--r-- | storage/devices.py | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/storage/__init__.py b/storage/__init__.py index 2223a440a..7e5418975 100644 --- a/storage/__init__.py +++ b/storage/__init__.py @@ -411,6 +411,9 @@ class Storage(object): Ignored devices are not included, nor disks with no media present. + Devices of types for which partitioning is not supported are also + not included. + This is based on the current state of the device tree and does not necessarily reflect the actual on-disk state of the system's disks. diff --git a/storage/devices.py b/storage/devices.py index d5a43a39c..cb68456c2 100644 --- a/storage/devices.py +++ b/storage/devices.py @@ -734,7 +734,8 @@ class StorageDevice(Device): @property def partitioned(self): - return self.format.type == "disklabel" + return self.format.type == "disklabel" and self.partitionable + class DiskDevice(StorageDevice): """ A disk """ |