[virt-tools-list] [virt-manager PATCH 4/4] inspection: try low quality icons as fallback

Pino Toscano ptoscano at redhat.com
Wed Feb 8 15:55:36 UTC 2017


When there is no high quality icon for a guest, try getting the low
quality icon.  This should make virt-manager show icons for Ubuntu and
Windows guests.
---
 virtManager/inspection.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/virtManager/inspection.py b/virtManager/inspection.py
index 5100a65..b6dae58 100644
--- a/virtManager/inspection.py
+++ b/virtManager/inspection.py
@@ -225,8 +225,11 @@ class vmmInspection(vmmGObject):
         if filesystems_mounted:
             # string containing PNG data
             icon = g.inspect_get_icon(root, favicon=0, highquality=1)
-            if icon == "":
-                icon = None
+            if icon == "" or icon is None:
+                # no high quality icon, try a low quality one
+                icon = g.inspect_get_icon(root, favicon=0, highquality=0)
+                if icon == "":
+                    icon = None
 
             # Inspection applications.
             apps = g.inspect_list_applications(root)
-- 
2.9.3




More information about the virt-tools-list mailing list