Show More
@@ -23,7 +23,14 b' class NotebookHandler(IPythonHandler):' | |||||
23 | cm = self.contents_manager |
|
23 | cm = self.contents_manager | |
24 |
|
24 | |||
25 | # will raise 404 on not found |
|
25 | # will raise 404 on not found | |
26 | model = cm.get(path, content=False) |
|
26 | try: | |
|
27 | model = cm.get(path, content=False) | |||
|
28 | except web.HTTPError as e: | |||
|
29 | if e.code == 404 and 'files' in path.split('/'): | |||
|
30 | # 404, but '/files/' in URL, let FilesRedirect take care of it | |||
|
31 | return FilesRedirectHandler.get(self, path) | |||
|
32 | else: | |||
|
33 | raise | |||
27 | if model['type'] != 'notebook': |
|
34 | if model['type'] != 'notebook': | |
28 | # not a notebook, redirect to files |
|
35 | # not a notebook, redirect to files | |
29 | return FilesRedirectHandler.get(self, path) |
|
36 | return FilesRedirectHandler.get(self, path) |
General Comments 0
You need to be logged in to leave comments.
Login now