[blivet:master 06/11] Make an early exit if self._existingSizeFields is []

mulhern amulhern at redhat.com
Tue Nov 25 23:22:42 UTC 2014


If so, there is no way to obtain size information and the value used
for other variants of that situation is 0, so return 0.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/formats/fs.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 0ae3e98..9b67838 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -312,6 +312,8 @@ class FS(DeviceFormat):
         size = self._size
 
         if self.exists and not size:
+            if not self._existingSizeFields:
+                return Size(0)
             if info is None:
                 info = self._getFSInfo()
 
-- 
1.9.3



More information about the anaconda-patches mailing list