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 | 6df56547e6ce002a3ea190a69b708da13e7eb66d (patch) | |
| tree | 1eea7afd9c3d51a17c4ae385d763e9d5ed0f3279 /sphinx/ext | |
| parent | b76e872db1268031dfe61025febb86dd5d3ffb19 (diff) | |
| download | sphinx-6df56547e6ce002a3ea190a69b708da13e7eb66d.tar.gz | |
Closes #932: autodoc: Do not crash if ``__doc__`` is not a string.
Diffstat (limited to 'sphinx/ext')
| -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 e26a6b85..05996f9e 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): |
