[blivet:rhel7/master 10/10] Move label setter and getter into DeviceFormat class (#1038590)

Anne Mulhern amulhern at redhat.com
Fri Jan 10 16:23:26 UTC 2014





----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> Sent: Friday, January 10, 2014 10:10:04 AM
> Subject: Re: [blivet:rhel7/master 10/10] Move label setter and getter into	DeviceFormat class (#1038590)
> 
> On Thu, 2014-01-09 at 13:55 -0500, mulhern wrote:
> > Related: rhbz#1038590
> > 
> > DeviceFormat does not have a label but SwapSpace as well as FS does, and
> > it is better to put the same restrictions on the label for both.
> > Note that the restriction has been reduced to converting "" to None.
> > The comments on the setter explain why it is not possible to be more
> > restrictive.
> > 
> > Signed-off-by: mulhern <amulhern at redhat.com>
> > ---
> >  blivet/formats/__init__.py | 38 ++++++++++++++++++++++++++++++++++++++
> >  blivet/formats/fs.py       | 45
> >  ++-------------------------------------------
> >  blivet/formats/swap.py     |  3 +++
> >  3 files changed, 43 insertions(+), 43 deletions(-)
> <snip>
> > diff --git a/blivet/formats/swap.py b/blivet/formats/swap.py
> > index d7c948e..29b608a 100644
> > --- a/blivet/formats/swap.py
> > +++ b/blivet/formats/swap.py
> > @@ -88,6 +88,9 @@ class SwapSpace(DeviceFormat):
> >          """Returns True since no known restrictions on the label."""
> >          return True
> >  
> > +    label = property(lambda s: s._getLabel(), lambda s,l: s._setLabel(l),
> > +       doc="this filesystem's label")
> 
> Swap is not a filesystem. Otherwise, looks good.
> 
Fixed in working copy.

- mulhern


More information about the anaconda-patches mailing list