properly handle directories not ending in .sagenb #138

Merged
merged 2 commits into from Mar 22, 2013

Conversation

Projects
None yet
2 participants
Member

ppurka commented Mar 3, 2013

Currently, supplying directory names without .sagenb extension results in a spectacular fail. This is a serious regression.

@kini kini commented on an outdated diff Mar 22, 2013

sagenb/notebook/run_notebook.py
@@ -505,6 +505,8 @@ def notebook_run(self,
directory = '%s/sage_notebook.sagenb' % DOT_SAGENB
else:
directory = directory.rstrip('/')
+ if directory[-7:] != '.sagenb':
@kini

kini Mar 22, 2013

Owner

You should use not directory.endswith('.sagenb'), I believe.

Member

ppurka commented Mar 22, 2013

Didn't know about that. Running to univ. Will send in a pull request soon.

Member

ppurka commented Mar 22, 2013

Ok. Updated. Thanks for checking. :)

Owner

kini commented Mar 22, 2013

Not that it was particularly important, of course, haha. Thanks :)

kini merged commit 9ad3993 into sagemath:master Mar 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment