From: Vratislav Podzimek <vpodzime(a)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 2af8209..e5efef6 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/9d3c8123486df889bc88ac7a2999...