mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-10 01:18:03 +03:00
virt-install: Exit gracefully when VM is undefined behind our back
We still error, but don't throw a traceback. Resolves: #455 Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
dd354e8b72
commit
c498c519ed
@ -840,11 +840,13 @@ class _InstalledDomain:
|
|||||||
|
|
||||||
return not self._domain.isActive()
|
return not self._domain.isActive()
|
||||||
except libvirt.libvirtError as e:
|
except libvirt.libvirtError as e:
|
||||||
if (self._transient and
|
if e.get_error_code() != libvirt.VIR_ERR_NO_DOMAIN:
|
||||||
e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN):
|
raise # pragma: no cover
|
||||||
|
|
||||||
|
if self._transient:
|
||||||
log.debug("transient VM shutdown and disappeared.")
|
log.debug("transient VM shutdown and disappeared.")
|
||||||
return True
|
return True
|
||||||
raise # pragma: no cover
|
fail(_("VM disappeared unexpectedly: %s") % e) # pragma: no cover
|
||||||
|
|
||||||
|
|
||||||
def _wait_for_domain(installer, instdomain, autoconsole, waithandler):
|
def _wait_for_domain(installer, instdomain, autoconsole, waithandler):
|
||||||
|
Loading…
Reference in New Issue
Block a user