[virt-tools-list] [virt-manager PATCH] create: fix a TypeError issue when detecting OS info

Chen Hanxiao chen_han_xiao at 126.com
Thu May 1 13:50:32 UTC 2014


On 05/01/2014 03:49 AM, Cole Robinson wrote:
> On 04/29/2014 10:53 PM, chenhanxiao at cn.fujitsu.com wrote:
> Here's the fix:
>
> diff --git a/virtManager/create.py b/virtManager/create.py
> index 1e359f9..c2e0ee7 100644
> --- a/virtManager/create.py
> +++ b/virtManager/create.py
> @@ -1206,6 +1206,7 @@ class vmmCreate(vmmGObjectUI):
>           type_row = self._selected_os_row()
>           if not type_row:
>               return
> +        old_type = type_row[0]
>
>           self.show_all_os = True
>           self.populate_os_type_model()
> @@ -1213,7 +1214,7 @@ class vmmCreate(vmmGObjectUI):
>           os_type_list = self.widget("install-os-type")
>           os_type_model = os_type_list.get_model()
>           for idx in range(len(os_type_model)):
> -            if os_type_model[idx][0] == type_row[0]:
> +            if os_type_model[idx][0] == old_type:
>                   os_type_list.set_active(idx)
>                   break
>
> populate_os_type_model will free type_row, so pull out the data ahead of time.
>
> I've pushed that now
>
> - Cole
>
>
Hmm, that's the root causes.
Thanks for your help.

- Chen





More information about the virt-tools-list mailing list