On Thu, 2010-04-01 at 15:58 -0400, Chris Lumens wrote: > If the request has a format, check if the format is resizable before offering > a resize option in the UI. This prevents us from offering to resize PVs, > which anaconda does not support. One comment inline, but ack in general. > > There's a related problem this does not fix: If you choose to reformat a PV > as a regular filesystem, the option to resize does not appear. > --- > storage/devices.py | 3 ++- > storage/formats/__init__.py | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/storage/devices.py b/storage/devices.py > index 6fe7d90..77266c7 100644 > --- a/storage/devices.py > +++ b/storage/devices.py > @@ -567,7 +567,8 @@ class StorageDevice(Device): > @property > def resizable(self): > """ Can this type of device be resized? """ > - return self._resizable and self.exists > + return self._resizable and self.exists and \ > + ((self.format and self.format.resizable) or not self.format) It's very difficult to catch a StorageDevice with no format attr. Unless you've seen a need for this is in testing, I'd just go straight to checking self.format.resizable. You can leave what's there if you prefer, of course. Dave > > def notifyKernel(self): > """ Send a 'change' uevent to the kernel for this device. """ > diff --git a/storage/formats/__init__.py b/storage/formats/__init__.py > index adf5ef1..2decf4c 100644 > --- a/storage/formats/__init__.py > +++ b/storage/formats/__init__.py > @@ -343,7 +343,7 @@ class DeviceFormat(object): > @property > def resizable(self): > """ Can formats of this type be resized? """ > - return self._resizable > + return self._resizable and self.exists > > @property > def bootable(self): _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list