[blivet] Keep RAID level singletons singular across copy operations
Anne Mulhern
amulhern at redhat.com
Tue May 6 20:04:41 UTC 2014
----- 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
More information about the anaconda-patches
mailing list