Show More
@@ -65,19 +65,11 class NotebookManager(LoggingConfigurable): | |||||
65 |
|
65 | |||
66 | def url_encode(self, path): |
|
66 | def url_encode(self, path): | |
67 | parts = path.split('/') |
|
67 | parts = path.split('/') | |
68 | path="" |
|
68 | return os.path.join(*[quote(p) for p in parts]) | |
69 | for part in parts: |
|
|||
70 | part = quote(part) |
|
|||
71 | path = os.path.join(path,part) |
|
|||
72 | return path |
|
|||
73 |
|
69 | |||
74 | def url_decode(self, path): |
|
70 | def url_decode(self, path): | |
75 | parts = path.split('/') |
|
71 | parts = path.split('/') | |
76 | path="" |
|
72 | return os.path.join(*[unquote(p) for p in parts]) | |
77 | for part in parts: |
|
|||
78 | part = unquote(part) |
|
|||
79 | path = os.path.join(path,part) |
|
|||
80 | return path |
|
|||
81 |
|
73 | |||
82 | def _notebook_dir_changed(self, new): |
|
74 | def _notebook_dir_changed(self, new): | |
83 | """do a bit of validation of the notebook dir""" |
|
75 | """do a bit of validation of the notebook dir""" |
General Comments 0
You need to be logged in to leave comments.
Login now