From 23bf2fa551eb17735f42b89ce2983cbc15f5d325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 27 Feb 2016 20:11:49 +0100 Subject: [PATCH] core: typo fix in error handling cont s/VIR_INTERNAL_ERROR/VIR_ERR_INTERNAL_ERROR/ Related to QubesOS/qubes-issues#1537 (cherry picked from commit 1e411ebccde707eab6e5e3dd8651174f41a1f0df) --- core-modules/000QubesVm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index 29e501e31..8085700a2 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -795,7 +795,7 @@ def get_cputime(self): if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN: return 0 # libxl_domain_info failed - domain no longer exists - elif e.get_error_code() == libvirt.VIR_INTERNAL_ERROR: + elif e.get_error_code() == libvirt.VIR_ERR_INTERNAL_ERROR: return 0 elif e.get_error_code() is None: # unknown... return 0 @@ -920,7 +920,7 @@ def is_running(self): 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: + elif e.get_error_code() == libvirt.VIR_ERR_INTERNAL_ERROR: return False elif e.get_error_code() is None: # unknown... return False @@ -939,7 +939,7 @@ def is_paused(self): 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: + elif e.get_error_code() == libvirt.VIR_ERR_INTERNAL_ERROR: return False elif e.get_error_code() is None: # unknown... return False