[PATCH 2/2] Call getPossiblePhysicalExtents() only once
Chris Lumens
clumens at redhat.com
Thu May 15 17:33:03 UTC 2014
> 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!
- Chris
More information about the anaconda-patches
mailing list