Allow period characters in notebook names.

This commit is contained in:
Stefan van der Walt 2011-08-18 19:11:49 -07:00
parent b5b4cf260f
commit fb2c31b2ea

View File

@ -52,9 +52,13 @@ class NotebookManager(LoggingConfigurable):
dict(notebook_id=notebook,name=name)
"""
names = os.listdir(self.notebook_dir)
names = [name.split(u'.')[0]
for name in names if name.endswith(self.filename_ext)]
import glob
names = glob.glob(os.path.join(self.notebook_dir,
'*' + self.filename_ext))
names = [os.path.splitext(os.path.basename(name))[0]
for name in names]
data = []
for name in names:
if name not in self.rev_mapping: