Show More
@@ -42,6 +42,11 b' class NotebookManager(LoggingConfigurable):' | |||||
42 | """) |
|
42 | """) | |
43 | def _notebook_dir_changed(self, name, old, new): |
|
43 | def _notebook_dir_changed(self, name, old, new): | |
44 | """do a bit of validation of the notebook dir""" |
|
44 | """do a bit of validation of the notebook dir""" | |
|
45 | if not os.path.isabs(new): | |||
|
46 | # If we receive a non-absolute path, make it absolute. | |||
|
47 | abs_new = os.path.abspath(new) | |||
|
48 | self.notebook_dir = abs_new | |||
|
49 | return | |||
45 | if os.path.exists(new) and not os.path.isdir(new): |
|
50 | if os.path.exists(new) and not os.path.isdir(new): | |
46 | raise TraitError("notebook dir %r is not a directory" % new) |
|
51 | raise TraitError("notebook dir %r is not a directory" % new) | |
47 | if not os.path.exists(new): |
|
52 | if not os.path.exists(new): |
General Comments 0
You need to be logged in to leave comments.
Login now