[rhel6-branch][v3][PATCH] Don't traceback due to unpartitioned devices (#1007683)
Martin Kolman
mkolman at redhat.com
Wed Oct 16 17:34:08 UTC 2013
On Wed, 2013-10-16 at 12:30 -0500, David Lehman wrote:
> On Wed, 2013-10-16 at 17:50 +0200, Martin Kolman wrote:
> > Disable the create dialog if an unpartitioned device is selected
> > in the tree view. If no device is selected, check all detected devices
> > and disable the create dialog if there are no partitioned devices.
> >
> > Signed-off-by: Martin Kolman <mkolman at redhat.com>
> > ---
> > iw/partition_gui.py | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
> >
> > diff --git a/iw/partition_gui.py b/iw/partition_gui.py
> > index 3751c5e..1cc3367 100644
> > --- a/iw/partition_gui.py
> > +++ b/iw/partition_gui.py
> > @@ -1346,7 +1346,21 @@ class PartitionWindow(InstallWindow):
> > # First we must decide what parts of the create_storage_dialog
> > # we will activate.
> >
> > + # get the currently selected device
> > + device = self.tree.getCurrentDevice()
> > +
> > + # check if the current device is partitioned,
> > + # if it isn't, we don't support it
> > activate_create_partition = True
> > + if device:
> > + # a device is selected in the GUI,
> > + # disable the create dialog if it is unpartitioned
> > + activate_create_partition = device.partitioned
> > + else:
> > + # device was not yet selected in the GUI,
> > + # check all devices and disable the create dialog
> > + # if there are no partitioned devices
> > + activate_create_partition = self.storage.partitioned
>
> I'd change this to:
>
> activate_create_partition = bool(self.storage.partitioned)
>
> Looks good aside from that.
Thanks, fixing locally.
>
> >
> > # We activate the create Volume Group radio button if there is a free
> > # partition with a Physical Volume format.
>
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
More information about the anaconda-patches
mailing list