summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-07-15 12:11:56 -0500
committerDavid Lehman <dlehman@redhat.com>2009-07-21 17:36:12 -0500
commit95bfb878eb23a430af284e82608948a0f0195509 (patch)
tree26279210f4bbf30f624898ecbc88ecb49567d4bc
parentbfb5922f0aa52c5ecfc1d8d05acd7d06af6ce8c6 (diff)
downloadanaconda-95bfb878eb23a430af284e82608948a0f0195509.tar.gz
anaconda-95bfb878eb23a430af284e82608948a0f0195509.tar.xz
anaconda-95bfb878eb23a430af284e82608948a0f0195509.zip
Support multiple fstab entries of a single nodev fstype. (#505969)
-rw-r--r--storage/devicetree.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/devicetree.py b/storage/devicetree.py
index 5a4a10514..5d85a6247 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -700,7 +700,8 @@ class DeviceTree(object):
Raise ValueError if the device's identifier is already
in the list.
"""
- if newdev.path in [d.path for d in self._devices]:
+ if newdev.path in [d.path for d in self._devices] and \
+ not isinstance(newdev, NoDevice):
raise ValueError("device is already in tree")
# make sure this device's parent devices are in the tree already
@@ -1860,7 +1861,8 @@ class DeviceTree(object):
""" List of device instances """
devices = []
for device in self._devices:
- if device.path in [d.path for d in devices]:
+ if device.path in [d.path for d in devices] and \
+ not isinstance(device, NoDevice):
raise DeviceTreeError("duplicate paths in device tree")
devices.append(device)