mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #932: autodoc: Do not crash if `__doc__
` is not a string.
This commit is contained in:
parent
166ac0d5ca
commit
38d73fb056
2
CHANGES
2
CHANGES
@ -28,6 +28,8 @@ Bugs fixed
|
||||
* #814: autodoc: Guard against strange type objects that don't have
|
||||
``__bases__``.
|
||||
|
||||
* #932: autodoc: Do not crash if ``__doc__`` is not a string.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user