summaryrefslogtreecommitdiffstats
path: root/storage/devices.py
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-04-10 09:56:28 +0200
committerHans de Goede <hdegoede@redhat.com>2009-04-10 09:56:28 +0200
commit684de1132bf76c6bc899f420e86d3e6267c41b81 (patch)
treea44fbaed0c6800930c68719abd45be1364dddcf3 /storage/devices.py
parentc65f4893e334ffcbae05ae4c8a7dd427c2b240ab (diff)
downloadanaconda-684de1132bf76c6bc899f420e86d3e6267c41b81.tar.gz
anaconda-684de1132bf76c6bc899f420e86d3e6267c41b81.tar.xz
anaconda-684de1132bf76c6bc899f420e86d3e6267c41b81.zip
Check self.partedPartition not being None before using it (#495077)
Diffstat (limited to 'storage/devices.py')
-rw-r--r--storage/devices.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/devices.py b/storage/devices.py
index 0d39d120e..e981e7a61 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -1222,7 +1222,7 @@ class PartitionDevice(StorageDevice):
def _getSize(self):
""" Get the device's size. """
size = self._size
- if len(self.parents) == 1:
+ if self.partedPartition:
# this defaults to MB
size = self.partedPartition.getSize()
return size