diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index 35f30d6b..12fce513 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -779,6 +779,8 @@ class QubesVm(object): # libxl_domain_info failed - domain no longer exists elif e.get_error_code() == libvirt.VIR_ERR_INTERNAL_ERROR: return 0 + elif e.get_error_code() is None: # unknown... + return 0 else: print >>sys.stderr, "libvirt error code: {!r}".format( e.get_error_code()) @@ -798,6 +800,8 @@ class QubesVm(object): # libxl_domain_info failed - domain no longer exists elif e.get_error_code() == libvirt.VIR_INTERNAL_ERROR: return 0 + elif e.get_error_code() is None: # unknown... + return 0 else: print >>sys.stderr, "libvirt error code: {!r}".format( e.get_error_code()) @@ -918,6 +922,11 @@ class QubesVm(object): except libvirt.libvirtError as e: if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN: return False + # libxl_domain_info failed - domain no longer exists + elif e.get_error_code() == libvirt.VIR_INTERNAL_ERROR: + return False + elif e.get_error_code() is None: # unknown... + return False else: print >>sys.stderr, "libvirt error code: {!r}".format( e.get_error_code()) @@ -932,6 +941,11 @@ class QubesVm(object): except libvirt.libvirtError as e: if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN: return False + # libxl_domain_info failed - domain no longer exists + elif e.get_error_code() == libvirt.VIR_INTERNAL_ERROR: + return False + elif e.get_error_code() is None: # unknown... + return False else: print >>sys.stderr, "libvirt error code: {!r}".format( e.get_error_code())