diff --git a/blivet/devices.py b/blivet/devices.py
index f8bc836..fe3bb1c 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -4252,6 +4252,9 @@ class BTRFSDevice(StorageDevice):
if not args or not args[0]:
args = ("btrfs.%d" % Device._id,)
+ if "parents" not in kwargs or kwargs["parents"] is None:
+ raise ValueError("BTRFSDevice must have at least one parent")
+
self.req_size = kwargs.pop("size", None)
super(BTRFSDevice, self).__init__(*args, **kwargs)
The following would be an equivalent piece of python for this test:
if kwargs.get("parents") is None:
...
- Chris