details: Fix regression in 'customize before install'

char target_port isn't available before we've installed the guest
This commit is contained in:
Cole Robinson 2014-02-04 17:32:46 -05:00
parent 6f93d3decf
commit b2b0ac0cc2

View File

@ -3152,7 +3152,8 @@ class vmmDetails(vmmGObjectUI):
label = devtype.capitalize()
if devtype in ["serial", "parallel", "console"]:
label += " %s" % (int(port) + 1)
if port is not None:
label += " %s" % (int(port) + 1)
elif devtype == "channel":
name = chardev.pretty_channel_name(chardev.target_name)
if name: