From: Vratislav Podzimek vpodzime@redhat.com
It's just more common these days and the definition is easier to find and recognize in the sources. --- blivet/devices/device.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/blivet/devices/device.py b/blivet/devices/device.py index 48ea554..62637aa 100644 --- a/blivet/devices/device.py +++ b/blivet/devices/device.py @@ -148,18 +148,18 @@ def _init_parent_list(self): for parent in list(self._parents): self._parents.remove(parent)
- def _set_parent_list(self, parents): + @property + def parents(self): + """ Devices upon which this device is built """ + return self._parents + + @parents.setter + def parents(self, parents): """ Set this instance's parent list. """ self._init_parent_list() for parent in parents: self._parents.append(parent)
- def _get_parent_list(self): - return self._parents - - parents = property(_get_parent_list, _set_parent_list, - doc="devices upon which this device is built") - @property def dict(self): d = {"type": self.type, "name": self.name,
anaconda-patches@lists.fedorahosted.org