[PATCH 09/13] Add and use MountpointSelector's attributes and properties
Brian C. Lane
bcl at redhat.com
Thu Mar 13 18:23:04 UTC 2014
On Mon, Mar 10, 2014 at 02:22:15PM +0100, Vratislav Podzimek wrote:
> This is the proper way how to do it.
>
> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> ---
> pyanaconda/ui/gui/spokes/custom.py | 70 +++++++++++++++++++-------------------
> widgets/python/AnacondaWidgets.py | 20 +++++++++++
> 2 files changed, 55 insertions(+), 35 deletions(-)
> + # our extension not related to the look of the widget
> + self._device = None
> + self._root = None
> +
> + @property
> + def device(self):
> + return self._device
> +
> + @device.setter
> + def device(self, new_device):
> + self._device = new_device
> +
> + @property
> + def root(self):
> + return self._root
> +
> + @root.setter
> + def root(self, new_root):
> + self._root = new_root
> +
I don't see the point in going to this trouble. If the properties aren't
adding any checking/caching/etc. just use them directly.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the anaconda-patches
mailing list