defined custom core command error that defaults to printing command output as well

This commit is contained in:
Blake J. Harnden 2018-03-02 16:22:20 -08:00
parent 29a3496eda
commit 974559843a
15 changed files with 90 additions and 81 deletions

View file

@ -13,6 +13,7 @@ import threading
import crypt
from core import CoreCommandError
from core import constants
from core import logger
from core.coreobj import PyCoreNetIf
@ -263,7 +264,7 @@ class XenNode(PyCoreNode):
if self.booted:
utils.check_cmd([XM_PATH, "destroy", self.vmname])
self.booted = False
except (OSError, subprocess.CalledProcessError):
except CoreCommandError:
# ignore this error too, the VM may have exited already
logger.exception("error during shutdown")