[blivet] Keep RAID level singletons singular across copy operations

David Shea dshea at redhat.com
Wed May 7 12:45:37 UTC 2014


On 05/07/2014 07:42 AM, Anne Mulhern wrote:
>
>
>
> ----- Original Message -----
>> From: "Anne Mulhern" <amulhern at redhat.com>
>> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
>> Sent: Tuesday, May 6, 2014 4:04:41 PM
>> Subject: Re: [blivet] Keep RAID level singletons singular across copy	operations
>>
>>
>>
>>
>>
>> ----- Original Message -----
>>> From: "David Shea" <dshea at redhat.com>
>>> To: anaconda-patches at lists.fedorahosted.org
>>> Sent: Tuesday, May 6, 2014 3:41:21 PM
>>> Subject: [blivet] Keep RAID level singletons singular across copy
>>> operations
>>>
>>> ---
>>>   blivet/devicelibs/raid.py | 6 ++++++
>>>   1 file changed, 6 insertions(+)
>>>
>>> diff --git a/blivet/devicelibs/raid.py b/blivet/devicelibs/raid.py
>>> index bdc17f7..cc86915 100644
>>> --- a/blivet/devicelibs/raid.py
>>> +++ b/blivet/devicelibs/raid.py
>>> @@ -237,6 +237,12 @@ class RAIDLevel(object):
>>>       def __str__(self):
>>>           return self.name
>>>   
>>> +    # Use the same singleton for copies of RAIDLevel objects.
>>> +    def __copy__(self):
>>> +        return self
>>> +
>>> +    def __deepcopy__(self, memo):
>>> +        return self
>>>   
>>>   class RAIDLevels(object):
>>>       """A class which keeps track of registered RAID levels. This class
>>> --
>>> 1.9.0
>>>
>>> _______________________________________________
>>> anaconda-patches mailing list
>>> anaconda-patches at lists.fedorahosted.org
>>> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>>>
>> Ack.
>>
>> - mulhern
>> _______________________________________________
>> anaconda-patches mailing list
>> anaconda-patches at lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>>
> Actually, would you mind if I incorporated the patch into my next RAID patch set?
>
> I think that if it got pushed now it would most likely find itself in the wrong class.
>
>

Sure.


More information about the anaconda-patches mailing list