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

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

 



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

_______________________________________________
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