delete notebook mapping in shutdown_kernel

This commit is contained in:
MinRK 2013-04-11 21:56:40 -07:00
parent 844758cca3
commit 05ead0496b

View File

@ -76,7 +76,7 @@ class MappingKernelManager(MultiKernelManager):
self.remove_kernel(kernel_id, now=True)
def start_kernel(self, notebook_id=None, **kwargs):
"""Start a kernel for a notebok an return its kernel_id.
"""Start a kernel for a notebook an return its kernel_id.
Parameters
----------
@ -102,6 +102,11 @@ class MappingKernelManager(MultiKernelManager):
return kernel_id
def shutdown_kernel(self, kernel_id, now=False):
"""Shutdown a kernel by kernel_id"""
super(MappingKernelManager, self).shutdown_kernel(kernel_id, now=now)
self.delete_mapping_for_kernel(kernel_id)
# override _check_kernel_id to raise 404 instead of KeyError
def _check_kernel_id(self, kernel_id):
"""Check a that a kernel_id exists and raise 404 if not."""