def _CheckCancel(self):
    # Cancel here if we were asked to
    if self._op.status == constants.OP_STATUS_CANCELING:
      logging.debug("Canceling opcode")
      raise CancelJob()
Raises an exception to cancel the job if asked to.
dataset/ETHPy150Open ganeti/ganeti/lib/jqueue/__init__.py/_OpExecCallbacks._CheckCancel