In the size property setting the self._size attribute, we make sure nothing else than a Size instance is assigned to self._size, but in the constructor we don't do any such check. --- blivet/devices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blivet/devices.py b/blivet/devices.py index 9e6efb4..353e761 100644 --- a/blivet/devices.py +++ b/blivet/devices.py @@ -423,7 +423,7 @@ class StorageDevice(Device):
self.uuid = uuid self._format = None - self._size = util.numeric_type(size) + self._size = Size(bytes=util.numeric_type(size)) self.major = util.numeric_type(major) self.minor = util.numeric_type(minor) self.sysfsPath = sysfsPath