Show More
@@ -42,6 +42,11 class NotebookManager(LoggingConfigurable): | |||
|
42 | 42 | """) |
|
43 | 43 | def _notebook_dir_changed(self, name, old, new): |
|
44 | 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 | 50 | if os.path.exists(new) and not os.path.isdir(new): |
|
46 | 51 | raise TraitError("notebook dir %r is not a directory" % new) |
|
47 | 52 | if not os.path.exists(new): |
General Comments 0
You need to be logged in to leave comments.
Login now