[f21/master] Avoid the possibility of a variable being unset before use (#1146585)
David Lehman
dlehman at redhat.com
Thu Sep 25 16:37:07 UTC 2014
On 09/25/2014 10:27 AM, David Shea wrote:
> ---
> pyanaconda/kickstart.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
> index fadc501..5ae8f71 100644
> --- a/pyanaconda/kickstart.py
> +++ b/pyanaconda/kickstart.py
> @@ -776,7 +776,7 @@ class LogVolData(commands.logvol.F20_LogVolData):
> raise KickstartValueError(formatErrorMsg(self.lineno,
> msg="The size \"%s\" is invalid." % self.size))
> except TypeError:
> - pass
> + size = Size(0)
>
> if self.mountpoint == "swap":
> ty = "swap"
>
This probably needs to be applied to the three other places this pattern
appears in kickstart.py (total of twice each in PartitionData and
LogVolData).
David
More information about the anaconda-patches
mailing list