Re: [PATCH] virtinst: correctly check if "allocation" is None

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cole Robinson <crobinso@xxxxxxxxxx> writes:

> On 09/20/2013 12:42 PM, Giuseppe Scrivano wrote:
>> 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,
>> 
>
> Actually I think I inadvertently fixed this earlier today in the process of
> gutting virtinst/storage.py to make it use XMLBuilder. Can you confirm its not
> an issue with current git?

Yeah!  It seems to be fixed now.

Cheers,
Giuseppe

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux