From 31075afed9f8fa008a3ed2a9ff0d7ed024ff8564 Mon Sep 17 00:00:00 2001 From: "georg.brandl" Date: Fri, 18 Jul 2008 22:55:36 +0000 Subject: Merged revisions 64808,65013,65076,65100-65101,65119,65121-65123 via svnmerge from svn+ssh://pythondev@svn.python.org/doctools/branches/0.4.x ........ r64808 | georg.brandl | 2008-07-08 21:39:33 +0200 (Tue, 08 Jul 2008) | 2 lines Allow relocation of source and doctree dir. ........ r65013 | georg.brandl | 2008-07-16 15:25:30 +0200 (Wed, 16 Jul 2008) | 2 lines Remove curious quote. ........ r65076 | georg.brandl | 2008-07-17 22:43:01 +0200 (Thu, 17 Jul 2008) | 2 lines Add a test for sphinx.quickstart. ........ r65100 | georg.brandl | 2008-07-18 14:41:54 +0200 (Fri, 18 Jul 2008) | 2 lines Fix phony targets. ........ r65101 | georg.brandl | 2008-07-18 14:55:03 +0200 (Fri, 18 Jul 2008) | 2 lines Fix problems in "make check". ........ r65119 | georg.brandl | 2008-07-18 23:06:42 +0200 (Fri, 18 Jul 2008) | 2 lines Emit a more precise error message in autodoc. ........ r65121 | georg.brandl | 2008-07-18 23:41:35 +0200 (Fri, 18 Jul 2008) | 2 lines Warn if a toctree-included document doesn't contain a title. ........ r65122 | georg.brandl | 2008-07-18 23:51:28 +0200 (Fri, 18 Jul 2008) | 2 lines Don't use \samp{} for code with whitespaces, only for :samp:`code`. ........ r65123 | georg.brandl | 2008-07-19 00:49:46 +0200 (Sat, 19 Jul 2008) | 2 lines Put inheritance info always on its own line. ........ --- sphinx/ext/autodoc.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sphinx/ext') diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index 45dcb7b9..74f59c13 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -355,10 +355,11 @@ def generate_rst(what, name, members, options, add_content, document, lineno, modfile = None # e.g. for builtin and C modules for part in objpath: todoc = getattr(todoc, part) - except (ImportError, AttributeError): + except (ImportError, AttributeError), err: warnings.append(document.reporter.warning( - 'autodoc can\'t import/find %s %r, check your spelling ' - 'and sys.path' % (what, str(fullname)), line=lineno)) + 'autodoc can\'t import/find %s %r, it reported error: "%s",' + 'please check your spelling and sys.path' % + (what, str(fullname), err), line=lineno)) return warnings, result # check __module__ of object if wanted (for members not given explicitly) @@ -416,6 +417,7 @@ def generate_rst(what, name, members, options, add_content, document, lineno, u':class:`%s.%s`' % (b.__module__, b.__name__) for b in todoc.__bases__] result.append(indent + u' Bases: %s' % ', '.join(bases), '') + result.append(u'', '') # the module directive doesn't have content if what != 'module': -- cgit v1.2.1