[anaconda:master 1/2] Make size_from_input() and size_from_entry() methods handier.
Chris Lumens
clumens at redhat.com
Fri Oct 17 15:24:23 UTC 2014
> diff --git a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
> index 4d0948c..a6a2263 100644
> --- a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
> +++ b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
> @@ -78,9 +78,26 @@ CONTAINER_TYPES = {DEVICE_TYPE_LVM: ContainerType(N_("Volume Group"), N_("
> # These cannot be specified as mountpoints
> system_mountpoints = ["/dev", "/proc", "/run", "/sys"]
>
> -def size_from_entry(entry):
> +def size_from_entry(entry, lower_bound=Size("1 MiB")):
This strikes me as dangerous for the same reason that this would be:
def size_from_entry(entry, lower_bound=[]):
Perhaps the best technique here to avoid problems is set
lower_bound=None and then set the real default in the both of the
method.
- Chris
More information about the anaconda-patches
mailing list