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:
Brian E. Granger 2013-01-13 19:44:01 -08:00 committed by Brian Granger
parent 82f4cf5574
commit ac1a8b0458
2 changed files with 3 additions and 4 deletions

View File

@ -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()

View File

@ -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."""