mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Removing return value of restart_kernel.
The kernel_id is *always* the same under a restart and there is no need to return it. The restart handler does pass the original kernel_id back to the browser as it currently uses it.
This commit is contained in:
parent
82f4cf5574
commit
ac1a8b0458
@ -364,9 +364,9 @@ class KernelActionHandler(AuthenticatedHandler):
|
||||
km.interrupt_kernel(kernel_id)
|
||||
self.set_status(204)
|
||||
if action == 'restart':
|
||||
new_kernel_id = km.restart_kernel(kernel_id)
|
||||
data = {'ws_url':self.ws_url,'kernel_id':new_kernel_id}
|
||||
self.set_header('Location', '/'+new_kernel_id)
|
||||
km.restart_kernel(kernel_id)
|
||||
data = {'ws_url':self.ws_url, 'kernel_id':kernel_id}
|
||||
self.set_header('Location', '/'+kernel_id)
|
||||
self.write(jsonapi.dumps(data))
|
||||
self.finish()
|
||||
|
||||
|
@ -350,7 +350,6 @@ class MappingKernelManager(MultiKernelManager):
|
||||
self._check_kernel_id(kernel_id)
|
||||
super(MappingKernelManager, self).restart_kernel(kernel_id)
|
||||
self.log.info("Kernel restarted: %s" % kernel_id)
|
||||
return kernel_id
|
||||
|
||||
def create_iopub_stream(self, kernel_id):
|
||||
"""Create a new iopub stream."""
|
||||
|
Loading…
Reference in New Issue
Block a user