Permalink
Browse files

use endswith()

  • Loading branch information...
1 parent b3939f2 commit 11020e437f69376d91521b6e53b2e0f494e44a02 @ppurka ppurka committed Mar 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 sagenb/notebook/run_notebook.py
@@ -505,7 +505,7 @@ def notebook_run(self,
directory = '%s/sage_notebook.sagenb' % DOT_SAGENB
else:
directory = directory.rstrip('/')
- if directory[-7:] != '.sagenb':
+ if not directory.endswith('.sagenb'):
directory += '.sagenb'
# First change to the directory that contains the notebook directory

0 comments on commit 11020e4

Please sign in to comment.