diff options
author | Georg Brandl <georg@python.org> | 2014-01-10 21:51:51 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-01-10 21:51:51 +0100 |
commit | 38d73fb056bef6dec97e88be7e8383a1242a885a (patch) | |
tree | 1eea7afd9c3d51a17c4ae385d763e9d5ed0f3279 /sphinx/ext/autodoc.py | |
parent | 166ac0d5ca870a355b290ceaee2ff80703c8d8f5 (diff) | |
download | sphinx-git-38d73fb056bef6dec97e88be7e8383a1242a885a.tar.gz |
Closes #932: autodoc: Do not crash if ``__doc__`` is not a string.
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r-- | sphinx/ext/autodoc.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index e26a6b85d..05996f9e5 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -450,9 +450,10 @@ class Documenter(object): # into lines if isinstance(docstring, unicode): return [prepare_docstring(docstring, ignore)] - elif docstring: + elif isinstance(docstring, str): # this will not trigger on Py3 return [prepare_docstring(force_decode(docstring, encoding), ignore)] + # ... else it is something strange, let's ignore it return [] def process_doc(self, docstrings): |