diff options
author | Georg Brandl <georg@python.org> | 2008-03-23 15:07:15 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-03-23 15:07:15 +0000 |
commit | 5d272bdd0d1eb765529f986859fef6b85bfcc68d (patch) | |
tree | 6cb932168ffc6fda4388b16c14f709a9583ef44a /sphinx/ext/autodoc.py | |
parent | a9f2247f621e5325871da5f7980d2248322d2ce1 (diff) | |
download | sphinx-git-0.1.61798.tar.gz |
Make sphinx compatible with docutils SVN snapshots.v0.1.61798
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r-- | sphinx/ext/autodoc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index 05091e70f..3518c3894 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -140,13 +140,13 @@ def generate_rst(what, name, members, undoc, add_content, indent += ' ' # add docstring content - if what == 'module' and env.config.automodule_skip_lines: + if what == 'module' and env.config.automodule_skip_lines and docstring: docstring = '\n'.join(docstring.splitlines() [env.config.automodule_skip_lines:]) # get the encoding of the docstring module = getattr(todoc, '__module__', None) - if module is not None: + if module is not None and docstring is not None: docstring = docstring.decode(get_module_charset(module)) docstring = prepare_docstring(docstring) |