##// END OF EJS Templates
unicode!
Min RK -
Show More
@@ -204,7 +204,7 b' class ContentsManager(LoggingConfigurable):'
204 204 for i in itertools.count():
205 205 name = u'{basename}{i}{ext}'.format(basename=basename, i=i,
206 206 ext=ext)
207 if not self.file_exists('{}/{}'.format(path, name)):
207 if not self.file_exists(u'{}/{}'.format(path, name)):
208 208 break
209 209 return name
210 210
@@ -213,7 +213,7 b' class ContentsManager(LoggingConfigurable):'
213 213 try:
214 214 validate(model['content'])
215 215 except ValidationError as e:
216 model['message'] = 'Notebook Validation failed: {}:\n{}'.format(
216 model['message'] = u'Notebook Validation failed: {}:\n{}'.format(
217 217 e.message, json.dumps(e.instance, indent=1, default=lambda obj: '<UNKNOWN>'),
218 218 )
219 219 return model
@@ -245,7 +245,7 b' class ContentsManager(LoggingConfigurable):'
245 245 raise HTTPError(400, "Unexpected model type: %r" % model['type'])
246 246
247 247 name = self.increment_filename(untitled + ext, path)
248 path = '{0}/{1}'.format(path, name)
248 path = u'{0}/{1}'.format(path, name)
249 249 model = self.save(model, path)
250 250 return model
251 251
@@ -276,7 +276,7 b' class ContentsManager(LoggingConfigurable):'
276 276 base, ext = os.path.splitext(from_name)
277 277 copy_name = u'{0}-Copy{1}'.format(base, ext)
278 278 to_name = self.increment_filename(copy_name, to_path)
279 to_path = '{0}/{1}'.format(to_path, to_name)
279 to_path = u'{0}/{1}'.format(to_path, to_name)
280 280
281 281 model = self.save(model, to_path)
282 282 return model
General Comments 0
You need to be logged in to leave comments. Login now