diff options
author | David Cantrell <dcantrell@redhat.com> | 2009-05-13 12:35:34 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2009-05-14 13:17:28 -1000 |
commit | f9a1864aac24bd383948b1f36f0816cd4bc79888 (patch) | |
tree | fbbfdb66fe715d430fd7b7d92916d748219e1e8a /storage/formats/fs.py | |
parent | 71c174873255d381b0a964303072114a87ea5f20 (diff) | |
download | anaconda-f9a1864aac24bd383948b1f36f0816cd4bc79888.tar.gz anaconda-f9a1864aac24bd383948b1f36f0816cd4bc79888.tar.xz anaconda-f9a1864aac24bd383948b1f36f0816cd4bc79888.zip |
Do not allow users to migrate ext4 to ext4.
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.
Diffstat (limited to 'storage/formats/fs.py')
-rw-r--r-- | 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 4527a0362..f045a77e4 100644 --- a/storage/formats/fs.py +++ b/storage/formats/fs.py @@ -672,8 +672,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" @@ -682,6 +681,8 @@ class FS(DeviceFormat): os.environ["PATH"].split(":")) and self.migrationTarget) + migratable = property(_isMigratable) + def _setMigrate(self, migrate): if not migrate: self._migrate = migrate @@ -837,11 +838,10 @@ class Ext3FS(Ext2FS): _modules = ["ext3"] _defaultMigrateOptions = ["-O", "extents"] - @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) |