Show More
@@ -206,16 +206,16 b' class NotebookManager(LoggingConfigurable):' | |||||
206 | try: |
|
206 | try: | |
207 | with open(path,'w') as f: |
|
207 | with open(path,'w') as f: | |
208 | current.write(nb, f, u'json') |
|
208 | current.write(nb, f, u'json') | |
209 | except: |
|
209 | except Exception as e: | |
210 | raise web.HTTPError(400, u'Unexpected error while saving notebook') |
|
210 | raise web.HTTPError(400, u'Unexpected error while saving notebook: %s' % e) | |
211 | # save .py script as well |
|
211 | # save .py script as well | |
212 | if self.save_script: |
|
212 | if self.save_script: | |
213 | pypath = os.path.splitext(path)[0] + '.py' |
|
213 | pypath = os.path.splitext(path)[0] + '.py' | |
214 | try: |
|
214 | try: | |
215 | with open(pypath,'w') as f: |
|
215 | with open(pypath,'w') as f: | |
216 | current.write(nb, f, u'py') |
|
216 | current.write(nb, f, u'py') | |
217 | except: |
|
217 | except Exception as e: | |
218 | raise web.HTTPError(400, u'Unexpected error while saving notebook as script') |
|
218 | raise web.HTTPError(400, u'Unexpected error while saving notebook as script: %s' % e) | |
219 |
|
219 | |||
220 | if old_name != new_name: |
|
220 | if old_name != new_name: | |
221 | old_path = self.get_path_by_name(old_name) |
|
221 | old_path = self.get_path_by_name(old_name) |
General Comments 0
You need to be logged in to leave comments.
Login now