details: Fix launching wrong window for duplicate VM name (bz 1630220)

https://bugzilla.redhat.com/show_bug.cgi?id=1630220
This commit is contained in:
Cole Robinson 2018-10-13 17:16:21 -04:00
parent 6e00d816c7
commit d39b7d1079

View File

@ -362,12 +362,12 @@ class vmmDetails(vmmGObjectUI):
def get_instance(cls, parentobj, vm):
try:
# Maintain one dialog per VM
connkey = vm.get_connkey()
key = "%s+%s" % (vm.conn.get_uri(), vm.get_uuid())
if cls._instances is None:
cls._instances = {}
if connkey not in cls._instances:
cls._instances[connkey] = vmmDetails(vm)
return cls._instances[connkey]
if key not in cls._instances:
cls._instances[key] = vmmDetails(vm)
return cls._instances[key]
except Exception as e:
if not parentobj:
raise