[master 2/5] Make sure size is numeric before comparing it with format minimum.

dwlehman installerbot-noreply at redhat.com
Fri Jul 24 21:41:10 UTC 2015


From: David Lehman <dlehman at redhat.com>

---
 blivet/devices/storage.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blivet/devices/storage.py b/blivet/devices/storage.py
index a836a6d..38af58b 100644
--- a/blivet/devices/storage.py
+++ b/blivet/devices/storage.py
@@ -113,7 +113,7 @@ def __init__(self, name, fmt=None, uuid=None,
         # partitions and lvs with thoughtless initial sizes.
         if not self.exists and fmt and fmt.minSize:
             min_size = max(util.numeric_type(size), fmt.minSize)
-            if min_size > size:
+            if min_size > util.numeric_type(size):
                 log.info("%s: using size %s instead of %s to accommodate "
                          "format minimum size", name, min_size, size)
                 size = min_size


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/7dab197c03e4c202135fc27e9b94cef828707155


More information about the anaconda-patches mailing list