On 01/28/2014 04:18 AM, Chen Hanxiao wrote: > From: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx> > > We could set multi console for VM and containers. > But our UI did not show the number of it. > It would bring troubles when we want to delete one. > This patch will show port number of console device > int typelabel. > > Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx> > --- > virtManager/details.py | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/virtManager/details.py b/virtManager/details.py > index 39a016a..662aa7b 100644 > --- a/virtManager/details.py > +++ b/virtManager/details.py > @@ -3021,6 +3021,9 @@ class vmmDetails(vmmGObjectUI): > else: > typelabel = _("%s Device") % char_type.capitalize() > > + if target_port is not None and \ > + chardev.virtual_device_type == "console": > + typelabel += " %s" % (int(target_port) + 1) > if target_port is not None and not show_target_type: > typelabel += " %s" % (int(target_port) + 1) > if primary: > ACK, but please use parentheses around the statement, I try to avoid the line break escape: if (target_port is not None and chardev... ): Thanks, Cole _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list