

def kill_kernel(self):
    ' Kill the running kernel. '
    if self.has_kernel:
        if (e._hb_channel is not None):
            self._hb_channel.pause()
        try:
            self.kernel.kill()
        except OSError as e:
            if (not ((sys.platform == 'win32') and (e.winerror == 5))):
                raise
        self.kernel = None
    else:
        raise RuntimeError('Cannot kill kernel. No kernel is running!')

dataset/ETHPy150Open ipython/ipython-py3k/IPython/parallel/engine/kernelstarter.py KernelStarter.kill_kernel/VarMisuse@21/36 `self`->`e`