domain: Remove unneeded release_handle command

Not really sure if we even still need to manually change the backing
value, but this was apparently a performance optimization once upon a
time.
This commit is contained in:
Cole Robinson 2010-02-11 14:00:46 -05:00
parent dfb8f8666a
commit 0bd42916a7
2 changed files with 1 additions and 6 deletions

View File

@ -1326,7 +1326,6 @@ class vmmConnection(gobject.GObject):
else:
# May be a new VM, we have no choice but
# to create the wrapper so we can see
# if its a previously inactive domain.
try:
vm = self.vmm.lookupByName(name)
uuid = util.uuidstr(vm.UUID())
@ -1348,7 +1347,6 @@ class vmmConnection(gobject.GObject):
curUUIDs[uuid] = vm
else:
vm = self.vms[uuid]
vm.release_handle()
vm.set_handle(rawvm)
curUUIDs[uuid] = vm
@ -1403,7 +1401,6 @@ class vmmConnection(gobject.GObject):
# Update VM states
for uuid in oldVMs:
self.emit("vm-removed", self.uri, uuid)
oldVMs[uuid].release_handle()
for uuid in newVMs:
self.emit("vm-added", self.uri, uuid)
for uuid in startVMs:

View File

@ -191,10 +191,8 @@ class vmmDomainBase(gobject.GObject):
return self.uuid
def set_handle(self, vm):
self._backend = vm
def release_handle(self):
del(self._backend)
self._backend = None
self._backend = vm
def get_handle(self):
return self._backend