[sagenb] 64/179: use endswith()

felix salfelder felix-guest at moszumanska.debian.org
Tue May 6 12:05:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

felix-guest pushed a commit to branch master
in repository sagenb.

commit 11020e437f69376d91521b6e53b2e0f494e44a02
Author: P Purkayastha <ppurka at gmail.com>
Date:   Fri Mar 22 10:58:32 2013 +0800

    use endswith()
---
 sagenb/notebook/run_notebook.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sagenb/notebook/run_notebook.py b/sagenb/notebook/run_notebook.py
index d7ea453..8f1b874 100644
--- a/sagenb/notebook/run_notebook.py
+++ b/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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagenb.git



More information about the debian-science-commits mailing list