[PATCH 2/3] Make sure StorageDevice's self._size is a Size instance (#1077179)
Vratislav Podzimek
vpodzime at redhat.com
Wed Mar 19 14:24:31 UTC 2014
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
--
1.8.5.3
More information about the anaconda-patches
mailing list