[PATCH] [PATCH] Don't traceback if there are no partitioned device (#1007683)

Vratislav Podzimek vpodzime at redhat.com
Wed Oct 16 07:53:00 UTC 2013


On Tue, 2013-10-15 at 18:15 +0200, Martin Kolman wrote:
> Disable the create dialog if an unpartitioned device is selected.
> 
> Signed-off-by: Martin Kolman <mkolman at redhat.com>
> ---
>  iw/partition_gui.py | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/iw/partition_gui.py b/iw/partition_gui.py
> index 3751c5e..e5d362f 100644
> --- a/iw/partition_gui.py
> +++ b/iw/partition_gui.py
> @@ -1346,7 +1346,14 @@ 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:
> +            activate_create_partition = device.partitioned
This looks good to me. Maybe there could be some more special cases,
that are not covered by this change, but I think we could deal with them
later in another patch if needed.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list