[virt-manager PATCH 21/21] i18n: improve label for floppy

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

 



Shortcut all the checks, and directly return the whole string (index
included) to show for floppies.

Signed-off-by: Pino Toscano <ptoscano@xxxxxxxxxx>
---
 virtManager/details/details.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/virtManager/details/details.py b/virtManager/details/details.py
index c13f6805..15843dd8 100644
--- a/virtManager/details/details.py
+++ b/virtManager/details/details.py
@@ -167,12 +167,12 @@ def _label_for_device(dev):
     devtype = dev.DEVICE_TYPE
 
     if devtype == "disk":
+        if dev.device == "floppy":
+            return _("Floppy %(index)d") % {"index": dev.disk_bus_index}
+
         busstr = vmmAddHardware.disk_pretty_bus(dev.bus) or ""
 
-        if dev.device == "floppy":
-            devstr = _("Floppy")
-            busstr = ""
-        elif dev.device == "cdrom":
+        if dev.device == "cdrom":
             devstr = _("CDROM")
         elif dev.device == "disk":
             devstr = _("Disk")
-- 
2.26.2




[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