[virt-manager PATCH 21/21] i18n: improve label for floppy
Pino Toscano
ptoscano at redhat.com
Mon Jul 13 08:25:59 UTC 2020
Shortcut all the checks, and directly return the whole string (index
included) to show for floppies.
Signed-off-by: Pino Toscano <ptoscano at redhat.com>
---
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
More information about the virt-tools-list
mailing list