[blivet:rhel7/master 1/3] Changes to the handling of filesystem labeling (#1038590)

Anne Mulhern amulhern at redhat.com
Sat Dec 21 13:39:14 UTC 2013





----- Original Message -----
> From: "Brian C. Lane" <bcl at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Friday, December 20, 2013 8:07:07 PM
> Subject: Re: [blivet:rhel7/master 1/3] Changes to the handling of filesystem	labeling (#1038590)
> 
> On Fri, Dec 20, 2013 at 06:12:51PM -0500, mulhern wrote:
> 
> > @@ -682,8 +747,11 @@ class FS(DeviceFormat):
> >  
> >      @property
> >      def labelfsProg(self):
> > -        """ Program used to manage labels for this filesystem type. """
> > -        return self._labelfs
> > +        """ Program used to manage labels for this filesystem type.
> > +
> > +            May be None if no such program exists.
> > +        """
> > +        return self._labelfs.name if self._labelfs else None
> 
> We avoid the inline if/else construct for readability. The same goes for
> the x = one or another style, for the most part.
>
 
The very first time I play with my new toy it gets confiscated ;(
Broken out to if statement in working copy.

> > diff --git a/blivet/formats/fslabel.py b/blivet/formats/fslabel.py
> > new file mode 100644
> > index 0000000..452bc78
> > --- /dev/null
> > +++ b/blivet/formats/fslabel.py
> > @@ -0,0 +1,216 @@
> > +# fslabel.py
> > +# Filesystem labelling classes for anaconda's storage configuration
> > module.
> > +#
> > +# Copyright (C) 2009  Red Hat, Inc.
> 
> 2013

Fixed in working copy.

> 
> > +class E2Label(FSLabelApp):
> > +    """Application used by ext2 and its descendants."""
> > +
> > +    _name = "e2label"
> > +
> > +    def reads(self):
> > +        return True
> 
> The subclass property needs @property otherwise it is just a method.

Ouch! Thanks for catching that. Fixed in working copy and tests fixed, too.

> 
> Ack, other than those comments.
> 
> --
> Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA
> (PST8PDT)
> _______________________________________________
> 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