Just checking "allocation" instead of "allocation is not None" inhibits the warning message when "allocation == 0". Related to bz 1000980. Signed-off-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx> --- virtinst/storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtinst/storage.py b/virtinst/storage.py index e0b0ef1..b2727ba 100644 --- a/virtinst/storage.py +++ b/virtinst/storage.py @@ -1363,7 +1363,7 @@ class LogicalVolume(StorageVolume): def __init__(self, conn, name, capacity, pool=None, pool_name=None, allocation=None, perms=None): - if allocation and allocation != capacity: + if allocation is not None and allocation != capacity: logging.warn(_("Sparse logical volumes are not supported, " "setting allocation equal to capacity")) StorageVolume.__init__(self, conn, name=name, -- 1.8.3.1 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list