domain: Don't throw error when stopping a transient domain
This commit is contained in:
parent
b11eeffae3
commit
18335a0b43
|
@ -1270,8 +1270,16 @@ class vmmDomain(vmmDomainBase):
|
|||
self.vcpu_max_count()
|
||||
|
||||
def _update_status(self, status=None):
|
||||
if status == None:
|
||||
try:
|
||||
info = self.get_info()
|
||||
except libvirt.libvirtError, e:
|
||||
if (hasattr(libvirt, "VIR_ERR_NO_DOMAIN") and
|
||||
e.get_error_code() == getattr(libvirt, "VIR_ERR_NO_DOMAIN")):
|
||||
# Possibly a transient domain that was removed on shutdown
|
||||
return
|
||||
raise
|
||||
|
||||
if status == None:
|
||||
status = info[0]
|
||||
status = self._normalize_status(status)
|
||||
|
||||
|
|
Loading…
Reference in New Issue