Show More
@@ -5,8 +5,6 b'' | |||||
5 |
|
5 | |||
6 | from .manager import ContentsManager |
|
6 | from .manager import ContentsManager | |
7 |
|
7 | |||
8 | import os.path |
|
|||
9 |
|
||||
10 | class ClientSideContentsManager(ContentsManager): |
|
8 | class ClientSideContentsManager(ContentsManager): | |
11 | """Dummy contents manager for use with client-side contents APIs like GDrive |
|
9 | """Dummy contents manager for use with client-side contents APIs like GDrive | |
12 |
|
10 | |||
@@ -25,8 +23,11 b' class ClientSideContentsManager(ContentsManager):' | |||||
25 | return True |
|
23 | return True | |
26 |
|
24 | |||
27 | def get_kernel_path(self, path, model=None): |
|
25 | def get_kernel_path(self, path, model=None): | |
28 | """Return the initial working dir a kernel associated with a given notebook |
|
26 | """Return the API path for the kernel | |
|
27 | ||||
|
28 | KernelManagers can turn this value into a filesystem path, | |||
|
29 | or ignore it altogether. | |||
29 |
|
30 | |||
30 | Here just alway return home directory |
|
31 | Here just always return home directory | |
31 | """ |
|
32 | """ | |
32 |
return |
|
33 | return '/' |
@@ -606,9 +606,9 b' class FileContentsManager(ContentsManager):' | |||||
606 | return "Serving notebooks from local directory: %s" % self.root_dir |
|
606 | return "Serving notebooks from local directory: %s" % self.root_dir | |
607 |
|
607 | |||
608 | def get_kernel_path(self, path, model=None): |
|
608 | def get_kernel_path(self, path, model=None): | |
609 |
"""Return the initial |
|
609 | """Return the initial API path of a kernel associated with a given notebook""" | |
610 | if '/' in path: |
|
610 | if '/' in path: | |
611 | parent_dir = path.rsplit('/', 1)[0] |
|
611 | parent_dir = path.rsplit('/', 1)[0] | |
612 | else: |
|
612 | else: | |
613 | parent_dir = '' |
|
613 | parent_dir = '' | |
614 |
return |
|
614 | return parent_dir |
General Comments 0
You need to be logged in to leave comments.
Login now