From 64dfb6c59547b8031e3e089003093bc5203841b5 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 13 Jun 2022 13:39:08 -0400 Subject: [PATCH] details: Go back to old Channel naming format The new format is too long and wordy IMO. It was added to handle qemu-vdagent ambiguity, since without it we would print the same string for spicevmc and qemu-vgagent channel. Let's just special case qemu-vdagent to solve that problem Signed-off-by: Cole Robinson --- virtManager/details/details.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/virtManager/details/details.py b/virtManager/details/details.py index ddc43b76..c91ed2d3 100644 --- a/virtManager/details/details.py +++ b/virtManager/details/details.py @@ -209,8 +209,10 @@ def _label_for_device(dev, disk_bus_index): if devtype == "channel": pretty_type = vmmAddHardware.char_pretty_type(dev.type) name = vmmAddHardware.char_pretty_channel_name(dev.target_name) - if name: - return _("Channel %(type)s (%(name)s)") % {"type": pretty_type, "name": name} + # Don't print channel name with qemu-vdagent, to avoid ambiguity + # with the typical spice agent channel + if name and dev.type != "qemu-vdagent": + return _("Channel (%(name)s)") % {"type": pretty_type, "name": name} return _("Channel %(type)s") % {"type": pretty_type} if devtype == "graphics":