[PATCH 2/2] Call getPossiblePhysicalExtents() only once

Vratislav Podzimek vpodzime at redhat.com
Fri May 16 07:16:09 UTC 2014


On Thu, 2014-05-15 at 13:33 -0400, Chris Lumens wrote:
> > diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
> > index e9828fb..3f69019 100644
> > --- a/pyanaconda/kickstart.py
> > +++ b/pyanaconda/kickstart.py
> > @@ -1571,10 +1571,11 @@ class VolGroupData(commands.volgroup.F21_VolGroupData):
> >              self.pesize = LVM_PE_SIZE.convertTo(spec="KiB")
> >  
> >          pesize = Size("%d KiB" % self.pesize)
> > -        if pesize not in getPossiblePhysicalExtents():
> > +        possible_extents = getPossiblePhysicalExtents()
> > +        if pesize not in possible_extents:
> >              raise KickstartValueError(formatErrorMsg(self.lineno,
> >                      msg=_("Volume group given physical size of \"%(extentSize)s\", but must be one of:\n%(validExtentSizes)s.") %
> > -                         {"extentSize": pesize, "validExtentSizes": ", ".join([str(e) for e in getPossiblePhysicalExtents()])}))
> > +                                            {"extentSize": pesize, "validExtentSizes": ", ".join(str(e) for e in possible_extents)}))
> 
> Please preserve the alignment of the { under the ( here.  Thanks!
Indeed, that's a good point, thanks! For some reason I thought I was
decreasing the indentation in that patch and I didn't want to make it so
drastical by aligning them one below the other. Fixing locally.

-- 
Vratislav Podzimek

Anaconda Rider | RHCE | Red Hat, Inc. | Brno - Czech Republic




More information about the anaconda-patches mailing list