Blame SOURCES/virt-manager-LVM-Show-warning-when-allocation-0-and-allocation-ca.patch

d0fc41
From 8ba3872256d3daf72b4fad4b08115965f0b9243e Mon Sep 17 00:00:00 2001
d0fc41
From: Giuseppe Scrivano <gscrivan@redhat.com>
d0fc41
Date: Fri, 1 Nov 2013 18:37:38 +0100
d0fc41
Subject: [RHEL-7.0 virt-manager PATCH] LVM: Show warning when allocation==0
d0fc41
 and allocation != capacity
d0fc41
d0fc41
RHEL-7 only.
d0fc41
d0fc41
commit aff0ddb2594cea6d0683659e059e4f3a35f0437e fixes this problem
d0fc41
upstream as a side effect of a refactoring.
d0fc41
d0fc41
Closes: bz#1021789
d0fc41
d0fc41
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
d0fc41
---
d0fc41
 virtinst/Storage.py | 2 +-
d0fc41
 1 file changed, 1 insertion(+), 1 deletion(-)
d0fc41
d0fc41
diff --git a/virtinst/Storage.py b/virtinst/Storage.py
d0fc41
index 1dc1768..dffc382 100644
d0fc41
--- a/virtinst/Storage.py
d0fc41
+++ b/virtinst/Storage.py
d0fc41
@@ -1379,7 +1379,7 @@ class LogicalVolume(StorageVolume):
d0fc41
d0fc41
     def __init__(self, name, capacity, pool=None, pool_name=None, conn=None,
d0fc41
                  allocation=None, perms=None):
d0fc41
-        if allocation and allocation != capacity:
d0fc41
+        if allocation is not None and allocation != capacity:
d0fc41
             logging.warn(_("Sparse logical volumes are not supported, "
d0fc41
                            "setting allocation equal to capacity"))
d0fc41
         StorageVolume.__init__(self, name=name, pool=pool, pool_name=pool_name,
d0fc41
-- 
d0fc41
1.8.4.2
d0fc41