summaryrefslogtreecommitdiffstats
path: root/storage/devices.py
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-04-10 10:00:11 +0200
committerHans de Goede <hdegoede@redhat.com>2009-04-10 10:00:11 +0200
commita3d1d828d647230a8e983b2f6eb7e9c8da3b9d27 (patch)
treee0fb2c833c594ece81422a3ff8b25913e16fc214 /storage/devices.py
parent684de1132bf76c6bc899f420e86d3e6267c41b81 (diff)
downloadanaconda-a3d1d828d647230a8e983b2f6eb7e9c8da3b9d27.tar.gz
anaconda-a3d1d828d647230a8e983b2f6eb7e9c8da3b9d27.tar.xz
anaconda-a3d1d828d647230a8e983b2f6eb7e9c8da3b9d27.zip
When deallocating a partition also set its disk attribute to None
Diffstat (limited to 'storage/devices.py')
-rw-r--r--storage/devices.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/devices.py b/storage/devices.py
index e981e7a61..080cd7fc7 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -1274,8 +1274,11 @@ class PartitionDevice(StorageDevice):
if self.disk:
self.disk.removeChild()
- self.parents = [disk]
- disk.addChild()
+ if disk:
+ self.parents = [disk]
+ disk.addChild()
+ else:
+ self.parents = []
disk = property(lambda p: p._getDisk(), lambda p,d: p._setDisk(d))