domain: We can't always release handle if undefining, fix another way

This commit is contained in:
Cole Robinson 2011-03-24 13:00:36 -04:00
parent 712981f256
commit 83145f28c3
2 changed files with 2 additions and 2 deletions

View File

@ -751,6 +751,7 @@ class vmmConnection(vmmGObject):
def rename_vm(self, domainobj, origxml, newxml):
# Undefine old domain
domainobj.delete()
domainobj.release_handle()
newobj = None
try:

View File

@ -1116,8 +1116,7 @@ class vmmDomain(vmmDomainBase):
def delete(self):
self._backend.undefine()
del(self._backend)
self._backend = None
# XXX: If want to release domain here, fix connection polling
def resume(self):
if self.get_cloning():