[sagemath] 04/09: Added a patch to avoid exceptions if/when documentation isn't found

Julien Puydt julien.puydt at laposte.net
Fri Mar 13 22:05:22 UTC 2015


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

jpuydt-guest pushed a commit to branch master
in repository sagemath.

commit 20d53c6b4da861a5e481f835294790a9952631e5
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Fri Mar 13 22:54:28 2015 +0100

    Added a patch to avoid exceptions if/when documentation isn't found
---
 debian/patches/sagedoc_avoid_exception.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/debian/patches/sagedoc_avoid_exception.patch b/debian/patches/sagedoc_avoid_exception.patch
new file mode 100644
index 0000000..a6db75f
--- /dev/null
+++ b/debian/patches/sagedoc_avoid_exception.patch
@@ -0,0 +1,12 @@
+--- a/sage/src/sage/misc/sagedoc.py
++++ b/sage/src/sage/misc/sagedoc.py
+@@ -1474,7 +1474,8 @@
+         if hasattr(module, '_sage_doc_'):
+             from sage.misc.sageinspect import sage_getdef, _sage_getdoc_unformatted
+             docstr = 'Help on ' + str(module) + '\n'
+-            docstr += 'Definition: ' + module.__name__ + sage_getdef(module) + '\n' 
++            if hasattr(module, '__name__'):
++                docstr += 'Definition: ' + module.__name__ + sage_getdef(module) + '\n'
+             pydoc.pager(docstr + _sage_getdoc_unformatted(module))
+         else:
+             python_help(module)

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



More information about the debian-science-commits mailing list