Commit 53904068 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Update notebook kernel manager to use async/await rather than

tornado coroutine
parent dc78031d
......@@ -6,8 +6,6 @@
from tornado import gen
from import MappingKernelManager
......@@ -25,7 +23,7 @@ class FSLeyesNotebookKernelManager(MappingKernelManager):
def __init__(self, *args, **kwargs):
super(FSLeyesNotebookKernelManager, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
def __patch_connection(self, kernel):
......@@ -40,16 +38,14 @@ class FSLeyesNotebookKernelManager(MappingKernelManager):
def start_kernel(self, **kwargs):
async def start_kernel(self, **kwargs):
"""Overrides ``MappingKernelManager.start_kernel``. Connects
all new kernels to the IPython kernel specified by ``connfile``.
kid = super(FSLeyesNotebookKernelManager, self)\
kid = await super().start_kernel(**kwargs)
kernel = self._kernels[kid]
raise gen.Return(kid)
return kid
def restart_kernel(self, *args, **kwargs):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment