MigrationItem: make the "suite" property read/write

Changing the suite requires update the item's canonical names, as these
need to reflect the new suite.

The property() function only applies to new-style classes, so we also
need to update MigrationItem to be new-style.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
master
Adam D. Barratt 13 years ago
parent 8eadbb71b3
commit 1e7a372d81

@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
class MigrationItem:
class MigrationItem(object):
_architectures = []
@classmethod
@ -124,10 +124,15 @@ class MigrationItem:
def package(self):
return self._package
@property
def suite(self):
def _get_suite(self):
return self._suite
def _set_suite(self, value):
self._suite = value
self._canonicalise_name()
suite = property(_get_suite, _set_suite)
@property
def version(self):
return self._version

Loading…
Cancel
Save