Re: [virt-manager PATCH] inspection: handle failures in application listing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/5/19 12:17 PM, Pino Toscano wrote:
> The Python binding of libguestfs errors out in case any of the details
> (e.g. summary, description) of an application are not proper UTF-8.
> This seems a rare situation, which nevertheless causes the failure of
> the inspection of a guest, making the rest of the metadata not used.
> 
> While these encoding issues are tackled, and fixed in python-libguestfs
> (or libguestfs itself), gracefully handle the failure of
> inspect_list_applications(), so at least the rest of the details of a
> guest are used/shown.
> ---
>  virtManager/inspection.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/virtManager/inspection.py b/virtManager/inspection.py
> index fde48474..9923dde2 100644
> --- a/virtManager/inspection.py
> +++ b/virtManager/inspection.py
> @@ -275,7 +275,11 @@ class vmmInspection(vmmGObject):
>                      icon = None
>  
>              # Inspection applications.
> -            apps = g.inspect_list_applications(root)
> +            try:
> +                apps = g.inspect_list_applications(root)
> +            except Exception:
> +                logging.exception("%s: exception while listing apps (ignored)",
> +                                  prettyvm)
>  
>          # Force the libguestfs handle to close right now.
>          del g
> 

Thanks, pushed now

- Cole

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux