[master 6/9] Accept both list and ParentList when checking LVs parents
vpodzime
installerbot-noreply at redhat.com
Mon Jun 8 14:13:39 UTC 2015
From: Vratislav Podzimek <vpodzime at redhat.com>
These are both valid types for the self.parents attribute.
---
blivet/devices/lvm.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py
index 3d6b3d6..a7c8eb0 100644
--- a/blivet/devices/lvm.py
+++ b/blivet/devices/lvm.py
@@ -41,7 +41,7 @@
import logging
log = logging.getLogger("blivet")
-from .lib import LINUX_SECTOR_SIZE
+from .lib import LINUX_SECTOR_SIZE, ParentList
from .device import Device
from .storage import StorageDevice
from .container import ContainerDevice
@@ -529,7 +529,7 @@ def __init__(self, name, parents=None, size=None, uuid=None, segType=None,
def _check_parents(self):
"""Check that this device has parents as expected"""
- if isinstance(self.parents, list):
+ if isinstance(self.parents, (list, ParentList)):
if len(self.parents) != 1:
raise ValueError("constructor requires a single %s instance" % self._containerClass.__name__)
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/587a06e50092c3cd697259313e5a0df1f9880719
More information about the anaconda-patches
mailing list