[virt-tools-list] [virt-manager PATCH 3/3] details: avoid extra check when showing application names

Pino Toscano ptoscano at redhat.com
Thu Apr 18 14:08:32 UTC 2019


The current code already prefers the "display name" over the "name" of
each application; hence, use "name" only if the "display name" is not
available.
---
 virtManager/details.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/virtManager/details.py b/virtManager/details.py
index 381e2594..f3295987 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
@@ -2528,10 +2528,10 @@ class vmmDetails(vmmGObjectUI):
         apps_model.clear()
         for app in apps:
             name = ""
-            if app.name:
-                name = app.name
             if app.display_name:
                 name = app.display_name
+            elif app.name:
+                name = app.name
             version = ""
             if app.epoch > 0:
                 version += str(app.epoch) + ":"
-- 
2.20.1




More information about the virt-tools-list mailing list