[blivet][rhel7-branch][PATCH] Return early when setting new size for non-existent partition.

David Lehman dlehman at redhat.com
Fri Sep 26 17:37:18 UTC 2014


On 09/26/2014 12:13 PM, Anne Mulhern wrote:
>
>
>
>
> ----- Original Message -----
>> From: "David Lehman" <dlehman at redhat.com>
>> To: anaconda-patches at lists.fedorahosted.org
>> Sent: Friday, September 26, 2014 12:55:49 PM
>> Subject: [blivet][rhel7-branch][PATCH] Return early when setting new size for	non-existent partition.
>>
>> Related: rhbz#978266
>> ---
>>   blivet/devices.py | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/blivet/devices.py b/blivet/devices.py
>> index 4496ad9..b22ee25 100644
>> --- a/blivet/devices.py
>> +++ b/blivet/devices.py
>> @@ -1979,6 +1979,7 @@ class PartitionDevice(StorageDevice):
>>               self._size = newsize
>>               self.req_size = newsize
>>               self.req_base_size = newsize
>> +            return
>>
>>           if newsize > self.disk.size:
>>               raise ValueError("partition size would exceed disk size")
>> --
>> 1.9.3
>>
>> _______________________________________________
>> anaconda-patches mailing list
>> anaconda-patches at lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>>
>
> If you're certain that everything below that line should only happen to existing devices, ack.

I am. The user is expected to call doPartitioning after making such a 
change to actually allocate new partitions on disk.

David

>
> - mulhern
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>



More information about the anaconda-patches mailing list