summaryrefslogtreecommitdiffstats
path: root/storage/__init__.py
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-06-30 17:35:07 -0500
committerDavid Lehman <dlehman@redhat.com>2009-07-01 12:53:25 -0500
commit4732e78775ce74362c4afc8979c54f5190b1ef76 (patch)
treed5b005d00e6db3b5eea29dbfed23fe74e6074f49 /storage/__init__.py
parentb7a5272ec3164a48cf3546acb78a14c601c2fddf (diff)
downloadanaconda-4732e78775ce74362c4afc8979c54f5190b1ef76.tar.gz
anaconda-4732e78775ce74362c4afc8979c54f5190b1ef76.tar.xz
anaconda-4732e78775ce74362c4afc8979c54f5190b1ef76.zip
Update code that checks for devices that contain install media.
Diffstat (limited to 'storage/__init__.py')
-rw-r--r--storage/__init__.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/storage/__init__.py b/storage/__init__.py
index 358b8088e..623eff11b 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -501,7 +501,7 @@ class Storage(object):
if not isinstance(device, Device):
raise ValueError("arg1 (%s) must be a Device instance" % device)
- if not ignoreProtected and device.name in self.protectedPartitions:
+ if not ignoreProtected and device.protected:
return _("This partition is holding the data for the hard "
"drive install.")
elif isinstance(device, PartitionDevice) and device.isProtected:
@@ -895,7 +895,7 @@ class Storage(object):
def isProtected(self, device):
""" Return True is the device is protected. """
- return device.name in self.protectedPartitions
+ return device.protected
def checkNoDisks(self):
"""Check that there are valid disk devices."""
@@ -1015,7 +1015,7 @@ def findExistingRootDevices(anaconda, upgradeany=False):
if not device.format.linuxNative or not device.format.mountable:
continue
- if device.name in anaconda.id.storage.protectedPartitions:
+ if device.protected:
# can't upgrade the part holding hd: media so why look at it?
continue
@@ -1057,8 +1057,7 @@ def mountExistingSystem(anaconda, rootEnt,
else:
readOnly = ""
- if rootDevice.name in anaconda.id.storage.protectedPartitions and \
- os.path.ismount("/mnt/isodir"):
+ if rootDevice.protected and os.path.ismount("/mnt/isodir"):
isys.mount("/mnt/isodir",
rootPath,
fstype=rootDevice.format.type,