On Wed, 2009-05-13 at 16:01 -1000, David Cantrell wrote: > Noticed that ext4 filesystems were presenting users with a 'migrate to' > combo box with 'ext4' as the only entry. Tracked down the problem to > the migratable property override in Ext3FS. Changed it around to use > helper functions with property() and the UI is working more sanely now. > Users cannot select ext4 as the migration target for ext4. This one looks good. > --- > storage/formats/fs.py | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/storage/formats/fs.py b/storage/formats/fs.py > index 6330825..d784341 100644 > --- a/storage/formats/fs.py > +++ b/storage/formats/fs.py > @@ -679,8 +679,7 @@ class FS(DeviceFormat): > > options = property(_getOptions, _setOptions) > > - @property > - def migratable(self): > + def _isMigratable(self): > """ Can filesystems of this type be migrated? """ > return bool(self._migratable and self.migratefsProg and > filter(lambda d: os.access("%s/%s" > @@ -689,6 +688,8 @@ class FS(DeviceFormat): > os.environ["PATH"].split(":")) and > self.migrationTarget) > > + migratable = property(_isMigratable) > + > def _setMigrate(self, migrate): > if not migrate: > self._migrate = migrate > @@ -874,11 +875,10 @@ class Ext3FS(Ext2FS): > > return size > > - @property > - def migratable(self): > + def _isMigratable(self): > """ Can filesystems of this type be migrated? """ > return (flags.cmdline.has_key("ext4migrate") and > - Ext2FS.migratable) > + Ext2FS._isMigratable(self)) > > register_device_format(Ext3FS) > _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list